- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
http://software.intel.com/en-us/articles/building-nat-friendly-applications/
This page has two links to code that can be used to demonstrate NAT traversal. When I convert the client code toVisual Studio 2008 format, it gives some errors when I compile it.How do I fix there errors?
Andthe client code is supposed to display a blank command prompt window when run, right?
This page has two links to code that can be used to demonstrate NAT traversal. When I convert the client code toVisual Studio 2008 format, it gives some errors when I compile it.How do I fix there errors?
Andthe client code is supposed to display a blank command prompt window when run, right?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Visual Studio project conversions are never straight forward.
What errors are you seeing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Client:
Warning 1 warning C4996: 'CWinApp::Enable3dControls': CWinApp::Enable3dControls is no longer needed. You should remove this call. c:\users\owner\downloads\natclient\natclientdialog.cpp 56 NatClientDialog
Warning 2 warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natclient\natclientdialogdlg.cpp 89 NatClientDialog
Warning 3 warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natclient\natclientdialogdlg.cpp 94 NatClientDialog
Warning 4 warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natclient\natclientdialogdlg.cpp 96 NatClientDialog
Error 5 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\users\owner\downloads\natclient\natclientdialogdlg.cpp 115 NatClientDialog
(I also included the warnings, figuring that they couldn't hurt.)
Server:
Warning 1 warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natserver\natserver\natserver.cpp 25 NATServer
Warning 2 warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natserver\natserver\natserver.cpp 117 NATServer
Warning 3 warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natserver\natserver\natserver.cpp 120 NATServer
Warning 4 warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natserver\natserver\natserver.cpp 155 NATServer
Warning 5 warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natserver\natserver\natserver.cpp 156 NATServer
(The server compiled just fine. It opened a blank command prompt window, but I am assuming that it is supposed to do that. I posted the warnings just in case. But they don't seem like they should be causing any problems.)
Warning 1 warning C4996: 'CWinApp::Enable3dControls': CWinApp::Enable3dControls is no longer needed. You should remove this call. c:\users\owner\downloads\natclient\natclientdialog.cpp 56 NatClientDialog
Warning 2 warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natclient\natclientdialogdlg.cpp 89 NatClientDialog
Warning 3 warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natclient\natclientdialogdlg.cpp 94 NatClientDialog
Warning 4 warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natclient\natclientdialogdlg.cpp 96 NatClientDialog
Error 5 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\users\owner\downloads\natclient\natclientdialogdlg.cpp 115 NatClientDialog
(I also included the warnings, figuring that they couldn't hurt.)
Server:
Warning 1 warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natserver\natserver\natserver.cpp 25 NATServer
Warning 2 warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natserver\natserver\natserver.cpp 117 NATServer
Warning 3 warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natserver\natserver\natserver.cpp 120 NATServer
Warning 4 warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natserver\natserver\natserver.cpp 155 NATServer
Warning 5 warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. c:\users\owner\downloads\natserver\natserver\natserver.cpp 156 NATServer
(The server compiled just fine. It opened a blank command prompt window, but I am assuming that it is supposed to do that. I posted the warnings just in case. But they don't seem like they should be causing any problems.)

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page