User forums > General (but related to Code::Blocks)
CB with MinGW x64 and wxWidgets: linker can't find wxmsw30
Searinox:
On x32 I can put breakpoints anywhere at any time during runtime and they instantly work... and anyways... I'd expect the break and terminate buttons to work. They always worked before. Now they do nothing.
--- Code: ---Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: D:\Personal\CodeBlocks\siw-test\
Adding source dir: D:\Personal\CodeBlocks\siw-test\
Adding file: D:\Personal\CodeBlocks\siw-test\bin\Debug\siw-test.exe
Changing directory to: D:/Personal/CodeBlocks/siw-test/.
Set variable: PATH=.;E:\CodeBlocks\wxWidgets\lib\gcc_lib;E:\CodeBlocks\MinGW\bin;E:\CodeBlocks\MinGW;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Program Files (x86)\Smart Projects\IsoBuster;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\QuickTime\QTSystem;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\AMD\ATI.ACE\Core-Static;D:\Program Files (x86)\GnuPG\pub
[debug]Command-line: E:\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet -args D:/Personal/CodeBlocks/siw-test/bin/Debug/siw-test.exe
[debug]Working dir : D:\Personal\CodeBlocks\siw-test
Starting debugger: E:\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet -args D:/Personal/CodeBlocks/siw-test/bin/Debug/siw-test.exe
done
[debug]> set prompt >>>>>>cb_gdb:
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
[debug]Reading symbols from D:/Personal/CodeBlocks/siw-test/bin/Debug/siw-test.exe...
[debug]done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.9.1
[debug]Copyright (C) 2015 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law. Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "x86_64-w64-mingw32".
[debug]Type "show configuration" for configuration details.
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]Find the GDB manual and other documentation resources online at:
[debug]<http://www.gnu.org/software/gdb/documentation/>.
[debug]For help, type "help".
[debug]Type "apropos word" to search for commands related to "word".
[debug]>>>>>>cb_gdb:
[debug]> set confirm off
Debugger name and version: GNU gdb (GDB) 7.9.1
[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> source E:\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory D:/Personal/CodeBlocks/siw-test/
[debug]Source directories searched: D:/Personal/CodeBlocks/siw-test;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: D:\Personal\CodeBlocks\siw-test\bin\Debug\siw-test.exe
Child process PID: 4496
[debug][New Thread 4496.0x2848]
Trying to pause the running process...
Trying to pause the running process...
Trying to pause the running process...
Trying to pause the running process...
Trying to pause the running process...
[debug][Inferior 1 (process 4496) exited normally]
[debug]>>>>>>cb_gdb:
[Inferior 1 (process 4496) exited normally]
[debug]> quit
Debugger finished with status 0
--- End code ---
EDIT: Found this http://sourceforge.net/p/mingw-w64/discussion/723798/thread/25ffa34d/ apparently x32/x64 issue. If anyone understands more about this, could you help please? Might or might not be the right thing though... my gdb.exe is 64bit. Tried checking "produce debugging symbols [-g]" in the compiler settings and did a full rebuild to no avail.
This is my exact issue
--- Quote ---Forking
If your application uses the 'fork' system call you'll have trouble stopping the debugged program or setting breakpoints on the fly. Here is a link explaining the forking modes of GDB: http://sourceware.org/gdb/onlinedocs/gdb/Forks.html
--- End quote ---
http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks
What do I have to do? I don't have fork in my code at all but this is precisely what happens.
Wait it just got even better! I wanted to try and attach the debugger to a running instance so I went to the folder where the exe was compiled ran it and guess what, it instantly quits the process list after launch silently.
It seems like I spoke too soon about having "finally got it to work", this setup is sputtering and coughing blood barely holding together at all! It has in fact not even produced an executable that can run independently from the IDE despite (mis)leading me to believe so! What more do I have to do?
oBFusCATed:
--- Quote from: Searinox on December 30, 2015, 09:16:22 pm ---It seems like I spoke too soon about having "finally got it to work", this setup is sputtering and coughing blood barely holding together at all! It has in fact not even produced an executable that can run independently from the IDE despite (mis)leading me to believe so! What more do I have to do?
--- End quote ---
Two/three options
1. copy the required dll files next to the exe.
2. modify the path variable and add the path to where the dlls are stored (this is what cb does for you when it start the application)
3. write a manifest and embed it in the exe.
Most people end doing 1.
For the debugger:
Does debugging with this particular build of gdb in a console session works?
Can you press ctrl-c and stop the debuggee/inferior and set some breakpoints?
Searinox:
I have no .dlls for that .exe. I'm using the SHARED=0 static libs which create a 10MB exe. The folder path is gcc_lib, no longer gcc_dll. A hello world console app does the same thing, immediately shuts down after opening. And yes it does have a _getch() and should stop for input before closing. Runs fine from IDE, immediately closes stand-alone.
I'm getting the exact same problem with a non-wxwidgets simple console application that uses just mingw64. The pause and stop controls don't work, live breakpoints don't work, and ctrl+c does absolutely nothing.
GDB is version 7.9.1.
ollydbg:
This is a known issue.
We have discussed before.
A 32bit CB can not break(stop) a 64 bit exe.
So, you need a 64bit CB.
Or you need a small tool too break the 64bit exe, this is not implemented yet.
Searinox:
Awful. Okay. Where can I find a page to compile C::B x64? Actually wait.... WHAT would I even be compiling it with? C::B x32? Better yet... are there any popular distros of precompiled x64 builds up for download anywhere?
I can't believe that after rummaging through obscure issue after obscure issue I might acutally have to forget the whole thing and go back to 32. It's funny because for instance Visual Studio 2013's environment is all 32bit apps yet the relevant exes are 64bit that it can do everything it needs to.
And this still doesn't explain why my 64bit .exes aren't running on their own. Again they were compiled with static libs and are large single exe files with no dlls, the folder is gcc_lib and in turn has no dlls in it either so yea, there should be no dependencies.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version