How to compile the wxwidgets for debug and release mode..???

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
idhan
Experienced Solver
Experienced Solver
Posts: 88
Joined: Tue Feb 28, 2006 9:03 pm

How to compile the wxwidgets for debug and release mode..???

Post by idhan » Fri Sep 01, 2006 11:21 am

Hi,

I am using codeblocks and mingw.
I have compile wxwidgets 2.6.2 using this guide:
- http://www.wxwidgets.org/wiki/index.php ... etup_Guide
and it compile without problem :-)

After that... I have open a new project wxWidgets.. the minimal example and it compile without error or warning and run :-)

Now..my problem is that on "Build target" I only have the option "all" and I dont have any option for "Debug" or "Release" mode... so..my cuestion are:

1- According to the Guide the compile process is using this command line:
make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0

Where is define the debug mode for this compilation?
Do I need to compile it again with different parameters??? if the answer is yes, which ones???

2- I have change the file "setup.0" on wxwidgets to use opengl, so the flag to create "glCanvas" is activated.. it is that ok? or do I need to do something else???

3- I have a application runing under MVC++ Profesional edition 2005, this application also use wxwidgets. So far in my debug and release compile configuration I have include the libraries:

glut32.lib wxmsw26d_gl.lib opengl32.lib glu32.lib wxmsw26d_core.lib wxbase26d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib winmm.lib comctl32.lib rpcrt4.lib wsock32.lib oleacc.lib odbc32.lib wxmsw26d_adv.lib

of course for debug and release mode, but under Mingw I get only *.a files, how this work for debug and release mode??? Also the compile process of wxwidgets with MVC++ produce many files *.lib but Mingw only y few *.a, it is that ok?? or I did something wrong????

4- The last one :-), any manual to understand how the compile parameters work for "Make" ???

thanks for you help... :-)

tiwag
Earned some good credits
Earned some good credits
Posts: 123
Joined: Tue Dec 21, 2004 8:51 pm
Location: Austria

Re: How to compile the wxwidgets for debug and release mode.

Post by tiwag » Fri Sep 01, 2006 5:28 pm

idhan wrote: Now..my problem is that on "Build target" I only have the option "all" and I dont have any option for "Debug" or "Release" mode... so..my cuestion are:

1- According to the Guide the compile process is using this command line:
make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0

Where is define the debug mode for this compilation?
Do I need to compile it again with different parameters??? if the answer is yes, which ones???
use

for ANSI release

Code: Select all

make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0
for ANSI debug

Code: Select all

make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=debug UNICODE=0
for unicode release

Code: Select all

make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1
for unicode debug

Code: Select all

make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=debug UNICODE=1
if you want to build CodeBlocks itself from the svn sources, you need the monolithic shared unicode wx-library, MingW gcc 3.4 and for debugging the gdb 6.3-2 debugger.

in most cases, it is sufficient to have the release version of wxWidgtes, you can generate debug-information for your code also when using a wx-release library, and you can debug your application without problems.
idhan wrote: of course for debug and release mode, but under Mingw I get only *.a files, how this work for debug and release mode??? Also the compile process of wxwidgets with MVC++ produce many files *.lib but Mingw only y few *.a, it is that ok?? or I did something wrong????
everything ok,
as long as you don't want to debug the library itself, you can use the release libraries and when you give the compiler-option -g in order to produce debug information, you can debug your code, but you can't (and probably wont) trace into the library's source code (for this purpose you would need a debug library)
idhan wrote: 4- The last one :-), any manual to understand how the compile parameters work for "Make" ???
its already on your harddrive

%WXWIN%\INSTALL-MSW.txt
-tiwag

idhan
Experienced Solver
Experienced Solver
Posts: 88
Joined: Tue Feb 28, 2006 9:03 pm

Post by idhan » Tue Sep 05, 2006 8:55 pm

thanks for answer my question :-)

but still I have one... under MVC++ I use the two type of libraries realse and debug, that means for example wxmsw26_gl.lib for release mode and wxmsw26d_gl.lib for debug mode (notice the "d") and if I do not so then doesn't work... I get error in the compile process...

with mingw it is not that way????

thanks again..

Post Reply