Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

C::B and MS 2005 free compiler?

<< < (5/5)

mandrav:

--- Quote ---When placing the cursor in the "Other linker options" area, the cursor is jumping to the middle of the box.  Starting to type "/DEBUG" makes it jump to the left again and allows me to type in this linker option.

However, after pressing the "OK" button and re-opening the compiler settings, the linker option is gone (the compiler option on the contrary remains, so this one is apparently saved).
--- End quote ---

Yes, libraries are files so you can select them through a file dialog, hence the buttons.

Other linker options are free-text so that you can use options C::B doesn't currently provide.
Anyway, I tried here to add /DEBUG in other linker options and it works fine. Yes, you may not see it there the next time you enter the dialog because this option is recognized by C::B. It's under the name "Produce debugging symbols" in compiler options. Try unchecking that option and checking it again.
The point is that unless /DEBUG is passed to the linker, debugging won't work.


--- Quote ---There's also still a warning for the compiler "ignoring unknown option '-g'"
--- End quote ---

Remove that option. It's left there from when your project used GCC as compiler (when created).

GeertVc:

--- Quote from: mandrav on August 15, 2006, 09:51:54 am ---Anyway, I tried here to add /DEBUG in other linker options and it works fine. Yes, you may not see it there the next time you enter the dialog because this option is recognized by C::B. It's under the name "Produce debugging symbols" in compiler options. Try unchecking that option and checking it again.
The point is that unless /DEBUG is passed to the linker, debugging won't work.
--- End quote ---

Unless I explicitely activate the checkbox next to "Produce debugging symbols", I don't see the /DEBUG linker option when compiling my app (console app in C).  Adding /DEBUG in the "Other linker options" and as a result the checkbox mentioned beforehand is checked, simply doesn't work in my case...

Anyway, even when I check this checkbox, it still doesn't solve my debug problem. 

This is the output of the compilation:

-------------- Build: Debug in ConApp ---------------
cl.exe /nologo /W3 /Zi /D_DEBUG /DDEBUG /DDEBUG  /ID:\WinApps\Programming\PlatformSDK\include /I"D:\WinApps\Programming\Microsoft Visual Studio 8\VC\include"  /c main.c /Foobj\Debug\main.obj
main.c
link.exe /nologo /LIBPATH:D:\WinApps\Programming\PlatformSDK\lib /LIBPATH:"D:\WinApps\Programming\Microsoft Visual Studio 8\VC\lib"  /out:.\ConApp.exe  obj\Debug\main.obj   /DEBUG
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 0 warnings
You see the /DEBUG option at the end of the linker syntax, but it's only there because I checked the checkbox, not because I've added it in the "Other linker option" section.

This is the output of the debugger (not much of improvement):

Building to ensure sources are up-to-date
Build succeeded
Selecting target: Debug
Adding source dir: F:\AppData\_MyProgramData\CodeBlocks\Nightly\ConApp\
Adding source dir: F:\AppData\_MyProgramData\CodeBlocks\Nightly\ConApp\
Adding file: .\ConApp.exe
Starting debugger: done
Setting breakpoints
Hello world!
Microsoft (R) Windows Debugger  Version 6.6.0007.5
Copyright (c) Microsoft Corporation. All rights reserved.
CommandLine: ./ConApp.exe
Symbol search path is: F:/AppData/_MyProgramData/CodeBlocks/Nightly/ConApp/
Executable search path is:
ModLoad: 00400000 00426000   ConApp.exe
ModLoad: 7c900000 7c9b6000   ntdll.dll
ModLoad: 7c800000 7c8fe000   C:\WINDOWS\system32\kernel32.dll
(a58.83c): Break instruction exception - code 80000003 (first chance)
eax=00241eb4 ebx=7ffd5000 ecx=00000000 edx=00000001 esi=00241f48 edi=00241eb4
eip=7c901230 esp=0012fb20 ebp=0012fc94 iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ntdll.dll -
ntdll!DbgBreakPoint:
7c901230 cc              int     3
*** WARNING: Unable to verify checksum for ConApp.exe
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\WINDOWS\system32\kernel32.dll -
Debugger finished with status 0




--- Quote from: mandrav on August 15, 2006, 09:51:54 am ---Remove that option. It's left there from when your project used GCC as compiler (when created).

--- End quote ---
Done.  Warning is gone, as can be seen when looking to the compiler output generated.

Best rgds,

--Geert

GeertVc:
This is the debugger output I get when building a WinGui app from the template:

Building to ensure sources are up-to-date
Build succeeded
Selecting target: Debug
Adding source dir: F:\AppData\_MyProgramData\CodeBlocks\Nightly\WinGui\
Adding source dir: F:\AppData\_MyProgramData\CodeBlocks\Nightly\WinGui\
Adding file: bin\Debug\WinGui.exe
Starting debugger: done
Setting breakpoints
Hello world!
Microsoft (R) Windows Debugger  Version 6.6.0007.5
Copyright (c) Microsoft Corporation. All rights reserved.
CommandLine: bin/Debug/WinGui.exe
Symbol search path is: F:/AppData/_MyProgramData/CodeBlocks/Nightly/WinGui/
Executable search path is:
ModLoad: 00400000 0041e000   WinGui.exe
ModLoad: 7c900000 7c9b6000   ntdll.dll
ModLoad: 7c800000 7c8fe000   C:\WINDOWS\system32\kernel32.dll
ModLoad: 77d10000 77da0000   C:\WINDOWS\system32\USER32.dll
ModLoad: 77e40000 77e87000   C:\WINDOWS\system32\GDI32.dll
(f9c.a40): Break instruction exception - code 80000003 (first chance)
eax=00241eb4 ebx=7ffde000 ecx=00000006 edx=00000040 esi=00241f48 edi=00241eb4
eip=7c901230 esp=0012fb20 ebp=0012fc94 iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for ntdll.dll -
ntdll!DbgBreakPoint:
7c901230 cc              int     3
*** WARNING: Unable to verify checksum for WinGui.exe
Breakpoint 1 hit
At F:\AppData\_MyProgramData\CodeBlocks\Nightly\WinGui\main.cpp:19


But here, I must say it works, despite the ERROR message I see...

Best rgds,

--Geert

mandrav:
This error message appears because you don't have the debug symbols of various system DLLs. Get used to it ;).

Navigation

[0] Message Index

[*] Previous page

Go to full version