Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
C::B and MS 2005 free compiler?
GeertVc:
--- Quote from: mandrav on August 14, 2006, 10:49:53 am ---OK, let's get some things straight first.
The Visual* Microsoft IDEs use the Ms debuggers "natively", i.e. communicating with the debugger DLLs through an API of some sort.
We don't have access to those DLLs and/or the API. So we must interface through a command-line frontend for the debugger. Much as we do with GDB.
This command-line frontend is cdb.exe. I don't know if it's part of the Visual* IDE editions. If you have one of them you can check for yourself. If it's there, no problem, put its path in "Additional paths" and it should work (assuming it is using the same text-interface as the standalone cdb.exe provided by Debugging Tools for Windows).
But, if cdb.exe is not on your hard disk, you must install the Debugging Tools for Windows which contain it, as said in my previous post.
--- End quote ---
Hi,
That already unveils a bit the way C::B is using the external debugger of M$. Thanks for the explanation.
What I still do not understand is, why a new project isn't taking the default settings I've given for the compiler.
I've selected "Build -> Compiler options" (I have version 1.0 rc2 installed) and then created a "new" selection in the Select Compiler section, called Microsoft Visual C++ Toolkit 2005. I've done this by copying the one for Visual Toolkit 2003 and modified all paths according the location for the C++ 2005 compiler. That sounds fine, right?
I've added all related links to the compiler (exe dirs, include dirs, lib dirs, resource compiler dir, etc...) and pressed the Set as default button.
I've also added the new path to the debugger, as you explained.
To me, it's clear C::B should take this compiler with those settings as the default one. However, if I create a new project, C::B still takes the GNU GCC Compiler as default one!
If I then manually select the Visual C++ Toolkit 2005 compiler selection I've created, all fields which were filled in for this Visual C++ Toolkit 2005 as default, are "vanished". That's something I can't explain.
Even the object files aren't generated...
Hope this behaviour can be clarified, otherwise C::B is useless to me and that would be a pity...
By the way: are there no own tutorials available showing you in detail how to set up things?
Best rgds,
--Geert
mandrav:
--- Quote from: GeertVc ---(I have version 1.0 rc2 installed)
--- End quote ---
but I said earlier:
--- Quote from: mandrav ---Here are some facts regarding debugging with C::B nightlies.
--- End quote ---
Please try with a nightly build.
GeertVc:
--- Quote from: mandrav on August 14, 2006, 04:15:18 pm ---Please try with a nightly build.
--- End quote ---
Ok,
Tried the nightly build of August, 14th.
I have now a situation where I can at least compile my target. I didn't reach this level so far... The recent nightly build "detects" the Micro$oft Visual C++ 2005 installation automatically, that's fine.
But, when creating a new project, C::B is still not taking MS Visual C++ 2005 as a default compiler, despite the fact I selected it as the default one.
It's still the GNU GCC compiler which is taken as default (which I'm absolutely not interested in under the Windows OS). Still a problem?
At last, when I finally select the correct compiler after project creation, the object file is generated.
Next to this, when trying to debug, I get the following error:
Building to ensure sources are up-to-date
Build succeeded
Selecting target: Debug
Adding source dir: F:\AppData\_MyProgramData\CodeBlocks\Nightly\Geert\
Adding source dir: F:\AppData\_MyProgramData\CodeBlocks\Nightly\Geert\
Adding file: .\Geert.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: ./Geert.exe
Symbol search path is: F:/AppData/_MyProgramData/CodeBlocks/Nightly/Geert/
Executable search path is:
ModLoad: 00400000 0040f000 image00400000
ModLoad: 7c900000 7c9b6000 ntdll.dll
ModLoad: 7c800000 7c8fe000 C:\WINDOWS\system32\kernel32.dll
(a9c.da0): 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 image00400000
*** ERROR: Module load completed but symbols could not be loaded for image00400000
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\WINDOWS\system32\kernel32.dll -
Debugger finished with status 0
Any idea? The path to the cdb.exe has been given correctly...
Best rgds,
--Geert
mandrav:
--- Quote ---Any idea? The path to the cdb.exe has been given correctly...
--- End quote ---
Yes, cdb is launched now so you 're on the right track.
To generate debugging symbols for MSVC* projects, you have to add DEBUG in compiler #defines *and* add /DEBUG in the linker options. Add these two, rebuild and try debugging again.
GeertVc:
--- Quote from: mandrav on August 15, 2006, 08:54:23 am ---you have to add DEBUG in compiler #defines *and* add /DEBUG in the linker options. Add these two, rebuild and try debugging again.
--- End quote ---
I was able to add DEBUG in the #define section of the compiler, but I was not able to add /DEBUG in the "Other linker options" section of the linker.
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).
What is strange is that, for the libraries, there's an "Add" button, but for the linker options, there isn't. Is this on purpose?
This is the compiler output I'm currently having. You see the /DDEBUG has being added, meaning the compiler #define is indeed taken into account.
-------------- Build: Debug in ConsoleApp ---------------
cl.exe /nologo /W3 -g /DDEBUG /ID:\WinApps\Programming\PlatformSDK\include /I"D:\WinApps\Programming\Microsoft Visual Studio 8\VC\include" /c main.c /Foobj\Debug\main.obj
cl : Command line warning D9002 : ignoring unknown option '-g'
main.c
link.exe /nologo /LIBPATH:D:\WinApps\Programming\PlatformSDK\lib /LIBPATH:"D:\WinApps\Programming\Microsoft Visual Studio 8\VC\lib" /out:.\ConsoleApp.exe obj\Debug\main.obj
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 0 warnings
For the linker, I don't see such option appearing...
There's also still a warning for the compiler "ignoring unknown option '-g'"
Best rgds,
--Geert
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version