Incongruous
2014-06-15 19:15:37 UTC
Installation:
~~~~~~~~~
D:\wxWidgets-3.0.0
Compiler/Settings
~~~~~~~~~~~~~~
Visual Studio 2013
Alt-F7->Configuration Properties -> C/C++ -> General -> Additional Include Directories: D:\wxWidgets-3.0.0\include;D:\wxWidgets-3.0.0\include\msvc
After installing [using the installer] and compiling wxWidgets-3.0.0 as a 64-bit library [solution = D:\wxWidgets-3.0.0\build\msw\wx_vc10.sln], I created a Console Application.
int main(){
std::cout << "Hello" << std::endl;
std::cin.get( );
return 0;
}
The application ran well until I changed the 'stdafx.h' to look like this:
#pragma once
#include "targetver.h"
#include <iostream>
/////////// ************** ///////////
// TODO: reference additional headers your program requires here
// For compilers that support precompilation, includes "wx/wx.h".
#include <wx/wxprec.h>
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
/////////// ************** ///////////
But this modification gave me this error:
1>------ Build started: Project: wxWidgetApplication, Configuration: Debug x64 ------
1> stdafx.cpp
1>D:\wxWidgets-3.0.0\include\wx/wxcrt.h(209): error 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.
1> C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\string.h(112) : see declaration of 'strcpy'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Again I modified the âstdafx.hâ to look like this:
#pragma once
// wxWidgetApplication.cpp : Defines the entry point for the console application.
#pragma warning( disable : 4996 ) // This removes the warning
#include "targetver.h"
// TODO: reference additional headers your program requires here
#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS // double wammy
#endif
#include <iostream>
// For compilers that support precompilation, includes "wx/wx.h".
#include <wx/wxprec.h>
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
But that gave me this other error:
1>------ Build started: Project: wxWidgetApplication, Configuration: Debug x64 ------
1> stdafx.cpp
1> wxWidgetApplication.cpp
1>LINK : fatal error LNK1104: cannot open file 'wxbase30ud.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
To fix that error I did this:
Alt-F7->Configuration Properties â> Linker â> General â> Additional Library Directories: D:\wxWidgets-3.0.0\lib\vc_x64_lib; D:\wxWidgets-3.0.0\lib\vc_lib
And now my program compiled.
In the future I will post more solutions as they come along.
Thanks Igor for the help, youâre the best man!
~~~~~~~~~
D:\wxWidgets-3.0.0
Compiler/Settings
~~~~~~~~~~~~~~
Visual Studio 2013
Alt-F7->Configuration Properties -> C/C++ -> General -> Additional Include Directories: D:\wxWidgets-3.0.0\include;D:\wxWidgets-3.0.0\include\msvc
After installing [using the installer] and compiling wxWidgets-3.0.0 as a 64-bit library [solution = D:\wxWidgets-3.0.0\build\msw\wx_vc10.sln], I created a Console Application.
int main(){
std::cout << "Hello" << std::endl;
std::cin.get( );
return 0;
}
The application ran well until I changed the 'stdafx.h' to look like this:
#pragma once
#include "targetver.h"
#include <iostream>
/////////// ************** ///////////
// TODO: reference additional headers your program requires here
// For compilers that support precompilation, includes "wx/wx.h".
#include <wx/wxprec.h>
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
/////////// ************** ///////////
But this modification gave me this error:
1>------ Build started: Project: wxWidgetApplication, Configuration: Debug x64 ------
1> stdafx.cpp
1>D:\wxWidgets-3.0.0\include\wx/wxcrt.h(209): error 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.
1> C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\string.h(112) : see declaration of 'strcpy'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Again I modified the âstdafx.hâ to look like this:
#pragma once
// wxWidgetApplication.cpp : Defines the entry point for the console application.
#pragma warning( disable : 4996 ) // This removes the warning
#include "targetver.h"
// TODO: reference additional headers your program requires here
#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS // double wammy
#endif
#include <iostream>
// For compilers that support precompilation, includes "wx/wx.h".
#include <wx/wxprec.h>
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
But that gave me this other error:
1>------ Build started: Project: wxWidgetApplication, Configuration: Debug x64 ------
1> stdafx.cpp
1> wxWidgetApplication.cpp
1>LINK : fatal error LNK1104: cannot open file 'wxbase30ud.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
To fix that error I did this:
Alt-F7->Configuration Properties â> Linker â> General â> Additional Library Directories: D:\wxWidgets-3.0.0\lib\vc_x64_lib; D:\wxWidgets-3.0.0\lib\vc_lib
And now my program compiled.
In the future I will post more solutions as they come along.
Thanks Igor for the help, youâre the best man!
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users