In Windows, the debug version of each built wxWidgets library has the character 'd', while the release version don't have.
However, in Linux, even if I type the command "./configure --enable-debug", the built library does not have the character 'd'.
How can I know whether the wxWidgets library I built in Linux is the debug version?
If I want to use both release and debug version of library on the same project in Linux, how can I build both debug and release version of wxWidgets library?
Building both debug & release version of WxWidgets on Li
-
- Ultimate wxWidgets Guru
- Posts: 672
- Joined: Tue Aug 31, 2010 6:22 am
- Location: Belgium
To build the libs, you should do something like this :
- cd <wxWidgets_dir>/build
- mkdir linux_debug
- cd linux_debug
- ../../configure <your_wx_options> --enable-debug && make && sudo make install
- cd ..
- mkdir linux_release
- cd linux_release
- ../../configure <your_wx_options> && make && sudo make install
Once everything is compiled, you must compile and link your app by using the wx-config script :
g++ `wx-config --cxxflags` ...
or
g++ `wx-config --cxxflags --debug` ...
and for link
g++ `wx-config --libs`
or
g++ `wx-config --libs --debug`
- cd <wxWidgets_dir>/build
- mkdir linux_debug
- cd linux_debug
- ../../configure <your_wx_options> --enable-debug && make && sudo make install
- cd ..
- mkdir linux_release
- cd linux_release
- ../../configure <your_wx_options> && make && sudo make install
Once everything is compiled, you must compile and link your app by using the wx-config script :
g++ `wx-config --cxxflags` ...
or
g++ `wx-config --cxxflags --debug` ...
and for link
g++ `wx-config --libs`
or
g++ `wx-config --libs --debug`
Hi,
As briceandre suggests, you should build in a subdirectory of the wxGTK source; but better still would be to configure with --prefix=$(pwd) and not install. That way different builds are stored in separate directories, and there is no chance of conflict. See e.g. http://forums.wxwidgets.org/viewtopic.php?t=29659
Regards,
David
They do in wx2.8 (actually, they should say 'ud' as you should have configured --enable-unicode ). However in wx2.9 that's no longer happens, as there's much less difference between a debug and a release library.However, in Linux, even if I type the command "./configure --enable-debug", the built library does not have the character 'd'.
As briceandre suggests, you should build in a subdirectory of the wxGTK source; but better still would be to configure with --prefix=$(pwd) and not install. That way different builds are stored in separate directories, and there is no chance of conflict. See e.g. http://forums.wxwidgets.org/viewtopic.php?t=29659
Regards,
David
The problem is that if I use your ways, the "make install" command will replace the existing library in /usr/local/lib. That mean if I compile and install the release version after the debug version, the debug version installed in /usr/local/lib will be replaced with release version.briceandre wrote:To build the libs, you should do something like this :
- cd <wxWidgets_dir>/build
- mkdir linux_debug
- cd linux_debug
- ../../configure <your_wx_options> --enable-debug && make && sudo make install
- cd ..
- mkdir linux_release
- cd linux_release
- ../../configure <your_wx_options> && make && sudo make install
Once everything is compiled, you must compile and link your app by using the wx-config script :
g++ `wx-config --cxxflags` ...
or
g++ `wx-config --cxxflags --debug` ...
and for link
g++ `wx-config --libs`
or
g++ `wx-config --libs --debug`
So, how to solve this?
-
- Ultimate wxWidgets Guru
- Posts: 672
- Joined: Tue Aug 31, 2010 6:22 am
- Location: Belgium
Re: Building both debug & release version of WxWidgets on Li
This Thread Seem To Be A Very Old Thread, But Very Useful To Me. For Example: The Explanation Above Seem To Be For Linux, Are There Example For Window?
Window 8.1 x86, Codeblock 20.03, TDC-GCC-10.3.0, C++ 20, wxWidgets-3.2.1
Re: Building both debug & release version of WxWidgets on Li
Hi,
What is you compiler? Do you use any IDE? How do you build the library?
Thank you.
What is you compiler? Do you use any IDE? How do you build the library?
Thank you.