wxWidgets - choosing debug vs. release
-
- CodeLite Enthusiast
- Posts: 12
- Joined: Fri Jan 30, 2009 8:58 am
- Contact:
wxWidgets - choosing debug vs. release
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
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
-
- CodeLite Curious
- Posts: 8
- Joined: Wed Feb 18, 2009 2:33 pm
- Contact:
Re: wxWidgets - choosing debug vs. release
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?
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?
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: wxWidgets - choosing debug vs. release
You can try and change the linker/compiler options from the project settings.
In the linker options (linker tab) change:
into
In the compiler options, change:
to
This will make sure that your code will link against the debug version of WX
Eran
In the linker options (linker tab) change:
Code: Select all
$(shell wx-config --debug=yes --libs --unicode=yes);
Code: Select all
$(shell wx-config --debug=no --libs --unicode=yes);
Code: Select all
$(shell wx-config --cxxflags --unicode=yes --debug=yes)
Code: Select all
$(shell wx-config --cxxflags --unicode=yes --debug=no)
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 12
- Joined: Fri Jan 30, 2009 8:58 am
- Contact:
Re: wxWidgets - choosing debug vs. release
Thank you Eran!
-
- CodeLite Curious
- Posts: 8
- Joined: Wed Feb 18, 2009 2:33 pm
- Contact:
Re: wxWidgets - choosing debug vs. release
it's ok now. Thank you...
-
- CodeLite Curious
- Posts: 2
- Joined: Mon Feb 23, 2009 9:23 pm
- Contact:
Re: wxWidgets - choosing debug vs. release
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.
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.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: wxWidgets - choosing debug vs. release
- 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
- make sure you have -g enabled
- try to rebuild your workspace and paste the 'Build' log here
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 2
- Joined: Mon Feb 23, 2009 9:23 pm
- Contact:
Re: wxWidgets - choosing debug vs. release
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
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
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: wxWidgets - choosing debug vs. release
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
'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
Make sure you have read the HOW TO POST thread