Hello guys,
i've got a problem while trying to debug the program i wrote.
I can't use "watches", after long search i figured out that this is a cause of missing debug symbols.
So i searched how to fix this. Unfortunately i have no idea where and how to add this -g,
cause i use code blocks for the first time and the flag "produce debug symbols(-g)" is not listed in "Settings -> compiler -> compiler flags"
So i tried to add this flag by hand, not working, i add it in "other compiler options" and just receive the message:
||=== Build: Debug in Complexe_rechnung (compiler: Borland C++ Compiler (5.5, 5.82)) ===|
||Error E2074: Value after -g or -j should be between 0 and 255 inclusive|
||Error E2075: Incorrect command line option: -g|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|
I'm using Win7 64bit
Code::Blocks 16.01
Thanks for your help!
I guess u mean this log? Copyed out from "build log" after re-build, as explained in the FAQ
-------------- Clean: Debug in Complexe_rechnung (compiler: Borland C++ Compiler (5.5, 5.82))---------------
Cleaned "Complexe_rechnung - Debug"
-------------- Build: Debug in Complexe_rechnung (compiler: Borland C++ Compiler (5.5, 5.82))---------------
bcc32.exe -q -w -v -ID:\Programme\Borland\BCC55\Include -oobj\Debug\input.obj -c input.c
input.c:
bcc32.exe -q -w -v -ID:\Programme\Borland\BCC55\Include -oobj\Debug\my_complex.obj -c my_complex.c
my_complex.c:
bcc32.exe -q -w -v -ID:\Programme\Borland\BCC55\Include -oobj\Debug\output.obj -c output.c
output.c:
bcc32.exe -q -w -v -ID:\Programme\Borland\BCC55\Include -oobj\Debug\testfile.obj -c testfile.c
testfile.c:
ilink32.exe -q -ap -v -LD:\Programme\Borland\BCC55\Lib -LD:\Programme\Borland\BCC55\Lib\PSDK c0x32 obj\Debug\input.obj obj\Debug\my_complex.obj obj\Debug\output.obj obj\Debug\testfile.obj,bin\Debug\Complexe_rechnung.exe,,cw32mt.lib import32.lib,,
Output file is bin\Debug\Complexe_rechnung.exe with size 71.00 KB
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
Well, that would explain a lot, if Borland is non debug compatible.
EDIT:
This happen, if i add a -g in "Settings -> compiler -> other compiler options"
-------------- Clean: Debug in Complexe_rechnung (compiler: Borland C++ Compiler (5.5, 5.82))---------------
Cleaned "Complexe_rechnung - Debug"
-------------- Build: Debug in Complexe_rechnung (compiler: Borland C++ Compiler (5.5, 5.82))---------------
bcc32.exe -q -w -v -g -ID:\Programme\Borland\BCC55\Include -oobj\Debug\input.obj -c input.c
Error E2074: Value after -g or -j should be between 0 and 255 inclusive
Error E2075: Incorrect command line option: -g
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))
Did you try -v (instead of -g) ?
http://docwiki.embarcadero.com/RADStudio/Berlin/en/C%2B%2B_Compiler_Debugging
Well, this option is listed as "debug on, inline expansion off", unfortunately i can't switch from "Release" to "Debug" without getting this error message:
Error: Unresolved external '_strtod' referenced from D:\PROJEKTE\CODE_BLOCKS\COMPLEXE_RECHNUNG\OBJ\DEBUG\INPUT.OBJ
in fact string.h is included. In "Release" mode this error doesn't appear.
EDIT: Figured the undo of the checkbox out on my own.
EDIT 2:
With the -v the log show
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.6.1
Starting the debuggee failed: No executable specified, use `target exec'.
Debugger finished with status 0