Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: wagb278 on April 18, 2009, 03:00:59 am
-
I'm having problems getting projects to build when I define __WXDEBUG__.
I now (finally) have installed the debug libraries. I hope my problem is that the builds are not using the debug version of the libraries.
How do I tell Code::Blocks to use the wxWidgets debug libraries? Also, do I need to use both (base and gtk2), or does base call gtk2? The libraries I have are (same location as the non-debug versions):
- base-unicode-debug-2.8
- gtk2-unicode-debug-2.8
I am running Code::Blocks SVN 5534 on Ubuntu Linux (64-bit) version 8.04 (Hardy) with wxWidgets 2.8.9 / unicode.
I expect that if I am building a Debug target of a wxWidgets project and the debug version of the wxWidgets libraries are installed the new project wizard would automatically invoke those instead of the "release" version.
I looked in the code::blocks project file expecting to see the non-debug libraries specified but that is not the case. I can't find where the wxWidgets libraries are invoked at all. I also looked in project's build options and don't see any wxWidgets libraries specified.
A little help, please.
-
I looked in the code::blocks project file expecting to see the non-debug libraries specified but that is not the case. I can't find where the wxWidgets libraries are invoked at all. I also looked in project's build options and don't see any wxWidgets libraries specified.
wxWidgets includes, compiler-flags, libs and linker-flags are invoked with calls of wx-config in "Build options -> Code::Blocks - Unix -> Compiler settings -> Other settings" and "Build options -> Code::Blocks - Unix -> Linker settings -> Other lunker options".
Just call wx-config --help from the console to see what options you need to use the debug-libraries.
-
Thanks - Working now.
I added `wx-config --libs --debug=yes` to the Project build options -> Linker Settings - Other linker options. Set __WXDEBUG__ in Compiler Settings -> Defines then rebuild project and for the first time with __WXDEBUG__ defined get an error-free build.
After adding #include <wx/debug.h> all works, even wxASSERT_MSG()