wx 3.0.2 compile puzzle
-
- In need of some credit
- Posts: 8
- Joined: Tue Jul 26, 2016 5:03 am
wx 3.0.2 compile puzzle
In my case , while compiling my C++ solution as Relase version, called the Library wx3.0 whose version is Release ,and in property page,C/C++--->Code Generation--->Runtime Library,which set to "Multi-threaded DLL(M/D)", in the processing of compiling , there's no error message, and an .exe file is created successfully.
Howerver,when put this .exe file to a PC without develop environment, an error will appeaerd, and the message is as shown below:
The program can't start because MSVCR120D.dll is missing from your computer. Try installing the program to fix this problem.
And in this case, if I change the WX3.0.2 to Wx2.8(whose version is also Release), and put the .exe to the same PC without develop environment, it can be started successfully. And i'm very sure that the version of WX3.0 is Release.
My puzzle is while called wx3.0 library,why the program will call the Debug dll while my program version is Release??? If anyone can help me to resolve the problem? Thanks
Howerver,when put this .exe file to a PC without develop environment, an error will appeaerd, and the message is as shown below:
The program can't start because MSVCR120D.dll is missing from your computer. Try installing the program to fix this problem.
And in this case, if I change the WX3.0.2 to Wx2.8(whose version is also Release), and put the .exe to the same PC without develop environment, it can be started successfully. And i'm very sure that the version of WX3.0 is Release.
My puzzle is while called wx3.0 library,why the program will call the Debug dll while my program version is Release??? If anyone can help me to resolve the problem? Thanks
Re: wx 3.0.2 compile puzzle
Check the library paths and library names you're linking into your project, maybe you're accidentally linking some debug versions somewhere.
Also try a clean rebuild of the wx libs and your project.
Also try a clean rebuild of the wx libs and your project.
Use the source, Luke!
Re: wx 3.0.2 compile puzzle
Check that this is for Configuration: Release and the same Platform:.shirley_hu wrote:in property page,C/C++--->Code Generation--->Runtime Library,which set to "Multi-threaded DLL(M/D)"
Make sure that Linker--->General--->Output File is really the one you are copying to the other machine.
-
- In need of some credit
- Posts: 8
- Joined: Tue Jul 26, 2016 5:03 am
Re: wx 3.0.2 compile puzzle
Thansk for your help and there's another puzzle troubled me. Why link Release VERSION wx3.0 to generate a program, and in the using of the program, errors like "An assertion failed" will appeared?doublemax wrote:Check the library paths and library names you're linking into your project, maybe you're accidentally linking some debug versions somewhere.
Also try a clean rebuild of the wx libs and your project.
Re: wx 3.0.2 compile puzzle
Does that mean that the original problem is solved?Thansk for your help and there's another puzzle troubled me.
Since wx 3.0 some asserts are even enabled in the release version. In order to change that (for Visual Studio) you have to edit the master copy of "setup.h" and rebuild the libraries.Why link Release VERSION wx3.0 to generate a program, and in the using of the program, errors like "An assertion failed" will appeared?
Edit <wx>/include/wx/msw/setup.h
Change this:
Code: Select all
// #ifdef NDEBUG
// #define wxDEBUG_LEVEL 0
// #else
// #define wxDEBUG_LEVEL 2
// #endif
Code: Select all
#ifdef NDEBUG
#define wxDEBUG_LEVEL 0
// #else
// #define wxDEBUG_LEVEL 2
#endif
Use the source, Luke!
-
- In need of some credit
- Posts: 8
- Joined: Tue Jul 26, 2016 5:03 am
Re: wx 3.0.2 compile puzzle
Does that mean that the original problem is solved?doublemax wrote:Thansk for your help and there's another puzzle troubled me.
No, the original problem still exits, and i've tried to rebuild the wx3.0 and the result is same.
Re: wx 3.0.2 compile puzzle
There must be one component that's still in debug mode.No, the original problem still exits, and i've tried to rebuild the wx3.0 and the result is same.
In the project properties:
Check the paths under: Linker -> General -> Additional Library Directories
Check the library names under: Linker -> Input -> Additional Dependencies
I'm almost sure there's a library in debug mode used somewhere. The debug libraries have a "d" in their name:
wxmsw30ud_adv.lib - "ud" => Unicode Debug
wxmsw30u_adv.lib - "u" => Unicode (Release)
If everything fails just use static linking. I'd prefer that anyway.
Use the source, Luke!
-
- In need of some credit
- Posts: 8
- Joined: Tue Jul 26, 2016 5:03 am
Re: wx 3.0.2 compile puzzle
I've checked the libaries which are input in Linker->Input,and have no idear which may cause the issue. The libraries are shown below,could you pls help to check them. thks.doublemax wrote:There must be one component that's still in debug mode.No, the original problem still exits, and i've tried to rebuild the wx3.0 and the result is same.
In the project properties:
Check the paths under: Linker -> General -> Additional Library Directories
Check the library names under: Linker -> Input -> Additional Dependencies
I'm almost sure there's a library in debug mode used somewhere. The debug libraries have a "d" in their name:
wxmsw30ud_adv.lib - "ud" => Unicode Debug
wxmsw30u_adv.lib - "u" => Unicode (Release)
If everything fails just use static linking. I'd prefer that anyway.
comctl32.lib;rpcrt4.lib;wsock32.lib;wxmsw30u_adv.lib;wxmsw30u_core.lib;wxbase30u.lib;wxbase30u_xml.lib;wxmsw30u_aui.lib;wxmsw30u_html.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;winmm.lib;oleacc.lib;odbc32.lib;odbccp32.lib;tcl84.lib;libnoact.lib;lmgr_dongle_stub.lib;libcrvs.lib;libsb.lib;lmgr_trl.lib;libFNPload.lib;Wbemuuid.lib;Ws2_32.lib;netapi32.lib;zip.lib;
Re: wx 3.0.2 compile puzzle
Debug versions usually have a "d" at their end or in another significant place. E.g. "wxmsw30u_core.lib" -> "wxmsw30ud_core.lib" or "zip.lib" -> "zipd.lib".
But i don't see any in that list, so i'm a little out of ideas at the moment.
But i don't see any in that list, so i'm a little out of ideas at the moment.
Use the source, Luke!
Re: wx 3.0.2 compile puzzle
Hi,
Could you try to place all wx libraries first and then all standard Windows one?
Something like this:
Could you try to place all wx libraries first and then all standard Windows one?
Something like this:
Code: Select all
wxmsw30u_adv.lib;wxmsw30u_core.lib;wxbase30u.lib;wxbase30u_xml.lib;wxmsw30u_aui.lib;wxmsw30u_html.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;winmm.lib;oleacc.lib;odbc32.lib;odbccp32.lib;tcl84.lib;libnoact.lib;lmgr_dongle_stub.lib;libcrvs.lib;libsb.lib;lmgr_trl.lib;libFNPload.lib;Wbemuuid.lib;Ws2_32.lib;netapi32.lib;zip.lib;
Re: wx 3.0.2 compile puzzle
Library order doesn't matter in Visual Studio. And if, it wouldn't explain this specific error.Could you try to place all wx libraries first and then all standard Windows one?
Try putting the linker in verbose mode. (Project properties -> Linker -> General -> Show Progress -> /Verbose
This will produce a big log, but maybe you'll detect something suspicious in it.
Use the source, Luke!
Re: wx 3.0.2 compile puzzle
I think using dependencywalker (depends.exe) might help locate the cause to a single wx DLL.
http://www.dependencywalker.com/
Tim S.
http://www.dependencywalker.com/
Tim S.