Page 1 of 1
wxWidgets - choosing debug vs. release
Posted: Sun Feb 15, 2009 7:27 pm
by Navid
I apologize if this is a repeat question, but I was unable to locate this topic again.
I am using wxW 2.8.9 and MingW 5.1.4 tool chain in CL 1.0.2759 on Windows XP Pro SP3. Probably 99.99~% of the time when I have a bug, it is in my own code rather than in wxWidgets. The debug release of my project links against the debug release of wxWidgets (the WXWIN and WXCFG environment variables are set up properly).
How can I link my own code's debug release against the release build of wxWidgets so that I do not always enter into the wxWidgets code when debugging?
Thanks in advance!
Navid
Re: wxWidgets - choosing debug vs. release
Posted: Wed Feb 18, 2009 2:37 pm
by asmcad
i have the same problem. does anybody know the solution??
thanks
what would it be environment variable? i have just changed 2.8.7 to 2.8.9 :=) because those files are in same folder(c:\) do i need to do anything else?
Re: wxWidgets - choosing debug vs. release
Posted: Wed Feb 18, 2009 3:49 pm
by eranif
You can try and change the linker/compiler options from the project settings.
In the linker options (linker tab) change:
Code: Select all
$(shell wx-config --debug=yes --libs --unicode=yes);
into
Code: Select all
$(shell wx-config --debug=no --libs --unicode=yes);
In the compiler options, change:
Code: Select all
$(shell wx-config --cxxflags --unicode=yes --debug=yes)
to
Code: Select all
$(shell wx-config --cxxflags --unicode=yes --debug=no)
This will make sure that your code will link against the debug version of WX
Eran
Re: wxWidgets - choosing debug vs. release
Posted: Thu Feb 19, 2009 6:31 am
by Navid
Thank you Eran!
Re: wxWidgets - choosing debug vs. release
Posted: Thu Feb 19, 2009 1:45 pm
by asmcad
it's ok now. Thank you...
Re: wxWidgets - choosing debug vs. release
Posted: Mon Feb 23, 2009 10:15 pm
by screw
Hi!
I made a wxWidgets project under Win XP and I couldn't debug it. I checked the build/configuration manager: workspace configuration was debug and checked the linker/compiler options from the project settings. It identical with Eranif's lines.
The debugger don't stop at the breakpoint. When I chose a simple (hello world) project, the debugger works!
Have you got any idea?
Thank you very much!
Of course I installed the codeline with wxWidgets.
Re: wxWidgets - choosing debug vs. release
Posted: Mon Feb 23, 2009 11:51 pm
by eranif
- make sure you are building the 'Debug' configuration
- make sure you have -g enabled
- try to rebuild your workspace and paste the 'Build' log here
Eran
Re: wxWidgets - choosing debug vs. release
Posted: Tue Feb 24, 2009 1:51 am
by screw
I left everything options on default.
Build log:
----------Build Started--------
"mingw32-make.exe" -j 1 -f "Workspace_wsp.mk"
----------Building project:[ first - Debug ]----------
g++ -c "C:/Program Files/CodeLite/Workspace/first_app.cpp" -g -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\wxWidgets-2.8.7\lib\gcc_dll\mswud -IC:\wxWidgets-2.8.7\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -D__WX__ -o ./Debug/first_app.o
g++ -c "C:/Program Files/CodeLite/Workspace/first_frame.cpp" -g -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -IC:\wxWidgets-2.8.7\lib\gcc_dll\mswud -IC:\wxWidgets-2.8.7\include -DWXUSINGDLL -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -D__WX__ -o ./Debug/first_frame.o
g++ -o ./Debug/first ./Debug/first_app.o ./Debug/first_frame.o -mthreads -LC:\wxWidgets-2.8.7\lib\gcc_dll -lwxmsw28ud -lwxtiffd -lwxjpegd -lwxpngd -lwxzlibd -lwxregexud -lwxexpatd -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwxregexud -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -mwindows
----------Build Ended----------
0 errors, 0 warnings, total time: 00:00:13 seconds
Re: wxWidgets - choosing debug vs. release
Posted: Tue Feb 24, 2009 3:42 pm
by eranif
This is a known issue for GDB, dont place your workspace in the paths with space in the name.
'C:\Program Files' , you will probably get an error like:
Function "C" is not defined or something like this.
Move your workspace to another location: 'C:\devl'
Eran