Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: jvpic on July 19, 2006, 11:03:09 am
-
Hello,
I have some troubleshooting with Nightly (17 July) version of CB. I post here because the nightly forum seems to be specific for announces.
First I describe the installation of CB, MinGW and wxWidgets.
MinGW current version (3.4.2) is installed in D:\MinGW
My PATH start with: D:\MinGW\bin;D:\MinGW\ming32\bin;....
Nightly CodeBlocks (17 Juil) installed in D:\CodeBlocks.
wxWidgets install in D:\wxWidgets-2.6.3
After compilation the lib\gcc_dll directory contains : libwxexpat.a libwxjpeg.a libwxmsw26u.a libwxpng.a libwxregexu.a libwxtiff.a libwxzlib.a and wxmsw26u_gcc_custom.dll
General Settings
================
Global Compiler Settings
Flags none
Linker libraries none
Directories:
Compiler D:\MinGW\include
linker D:\MinGW\lib
resource compiler D:\MinGw\include
Programs:
Installation: D:\MinGW
C Compiler: mingw32-gcc.exe (pointing on d:\MinGW\bin directory)
C++ compiler: mingw32-g++.exe (same as top)
Linker dynamic mingw32-g++.exe
Linker static ar.exe
Debug gdb.exe
Resource compiler: windres.exe
Make mingw32-make.exe
Settings global variables :
base: wx=D:\wxWidgets-2.6.3
The remainder empty
Project Build options
===============
Flags : -g -W
Compiler:
$(#wx)\include
$(#wx)\lib\gcc_dll\mswu
$(#wx)\contrib\include
Linker:
$(#wx)\lib\gcc_dll
Ressource compiler:
empty
Linker: link libraries:
libwxmsw26u.a
gdi32
The remainder is empty
Compilation of the wxWidgets template
=============================
Precompiling header: wx_pch.h
Compiling: main.cpp
Compiling: app.cpp
Linking console executable: bin\Debug\EssaiWx.exe
Process terminated with status 0 (0 minutes, 11 seconds)
0 errors, 0 warnings
Running:
======
Popup error window: Composant not find: wxmsw26u_gcc_custom.dll
In build log window
Checking for existence: D:\~A\EssaiWx\bin\Debug\EssaiWx.exe
Executing: D:\CodeBlocks/cb_console_runner.exe "D:\~A\EssaiWx\bin\Debug\EssaiWx.exe" (in D:\~A\EssaiWx\.)
Process terminated with status -1073741515 (1 minutes, 19 seconds)
If I copy this wxmsw26u_gcc_custom.dll in wxWidgets directory (with the others dll yet present) The result of running is the same.but if I copy this dll in the EssaiWx Debug and release directory, EssaiWx runs !
This problem is a distribution problem but when I run EssaiWx from CodeBlocks the IDE should find the dll isn't it?
Debugging
=========
I put a breakpoint on line where wxApp constructs the frame. I verify that brekpoint is well enregistered but when I run the debug session the process show the main frame and terminate normally when I close the frame ! The breakpoint is not operating.
I must say that the same occurs with a console application.
In debugger window
Building to ensure sources are up-to-date
Build succeeded
Selecting target: Debug
Adding source dir: D:\~A\EssaiWx\
Adding source dir: D:\~A\EssaiWx\
Adding file: bin\Debug\EssaiWx.exe
Starting debugger: done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb 5.2.1
No source file named D:/~A/EssaiWx/app.cpp.
and after closing
Program exited normally.
Debugger finished with status 0
Ok I beg your pardon for this long, very long note and two questions arise:
1) How to run from the inside of CB without copying the wx custom dll ? Putting the path of this dll in variable environment PATH ?
2) The breakpoints seem to not break the debug process How to deal with that ?
I thank you for help and apologize for this long note. :(
-
upgrade your gdb : 6.3.2 : http://prdownloads.sf.net/mingw/gdb-6.3-2.exe?download
this might solve the breakpoint issue, and make sure your build is done with the -g option.
-
If I copy this wxmsw26u_gcc_custom.dll in wxWidgets directory (with the others dll yet present) The result of running is the same.but if I copy this dll in the EssaiWx Debug and release directory, EssaiWx runs !
This problem is a distribution problem but when I run EssaiWx from CodeBlocks the IDE should find the dll isn't it?
The wxWidgets DLL is expected to be eigther within any of the path's of your PATH environment or inside the folder of the very executable you are currently operating on.
To make it work for you you have 4 options:
1.) copy the wxWidgets DLL into your Windows\system32 folder thus have it available for all you wxWidgets projects, just as any other system DLL
2.) copy the wxWidgets DLL to all the folders you are producing (or running) your projects from - this is the worst solution
3.) expand the PATH envrionment variable to include the wxWidgets path that holds the DLL thus you can use this DLL with all your projects
4.) Compile/link the wxWidgets lib statically (not dynamically) to your projects, thus you will not need the DLL anymore but you will have to change your projects options and will receive a much bigger executable then (of course)
So this isn't a bug but usual behaviour. If the Windows\system32 wouldn't be in the PATH environment nearly all applications would complain about a hell of DLL's they are missing.
With regards, Morten.
-
2) The breakpoints seem to not break the debug process How to deal with that ?
Make sure you compile your project with the debug options enabled (as killerbot said) and also make sure once you've enabled this option to re-build your entire project!
-
Hi Killerbot
upgrade your gdb : 6.3.2 : http://prdownloads.sf.net/mingw/gdb-6.3-2.exe?download
this might solve the breakpoint issue, and make sure your build is done with the -g option.
Indeed with gdb 6.3.2 all run fine ! It is strange that GDB 5.2.1 from minGW package doesn't work and is part of mingw. Perhaps could you update the excellent nightly cookbook ?
For the custom dll I have updated my PATH and all work.
I thank all the users who reply to my difficulties. :P
-
Indeed with gdb 6.3.2 all run fine ! It is strange that GDB 5.2.1 from minGW package doesn't work and is part of mingw. Perhaps could you update the excellent nightly cookbook ?
done