Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: cborders on December 13, 2005, 06:40:01 pm

Title: Debugging
Post by: cborders on December 13, 2005, 06:40:01 pm
I just downloaded CodeBlocks and I am using it to develop with Ogre using the Windows SDK and the VS2003 compiler.  I tried to debug my application and it tool me that the debug path was not set in the preferences.  So I tried to set it, but didn't know what it should point to.  What should I put in that box?
Title: Re: Debugging
Post by: mandrav on December 13, 2005, 06:54:56 pm
First of all, what version of C::B are you using?
Title: Re: Debugging
Post by: cborders on December 13, 2005, 06:58:51 pm
Sorry about that!  I am using C::B 1.0 rc2
Title: Re: Debugging
Post by: mandrav on December 13, 2005, 07:04:07 pm
Well, debugger support for MSVC Toolkit has been recently added in SVN. This means you would either have to build HEAD yourself (check the wiki (http://wiki.codeblocks.org)) or use one of the prebuilt HEAD snapshots (this (http://forums.codeblocks.org/index.php?topic=1372.0) for example).
Title: Re: Debugging
Post by: cborders on December 13, 2005, 07:08:36 pm
Awesome!  Thank you!
Title: Re: Debugging
Post by: takeshimiya on December 13, 2005, 07:15:08 pm
Cideblocks :lol:

Probably http://wiki.codeblocks.org/ will work better. :P
Title: Re: Debugging
Post by: cborders on January 17, 2006, 05:38:23 pm
Ok, I am still trying to get this working.  I downloaded the prebuild SVN-HEAD and installed it, reset all of my includes and linker paths butb now my app runs fin under the Release build, but crashes under the Debug build.  I tried to debug the app, which is why I started this process and I got this error:
(http://i18.photobucket.com/albums/b141/CasetB/error.png)
So I try to set it up, but it's already set:
(http://i18.photobucket.com/albums/b141/CasetB/Settings.png)
So I think, what in the world is going on!  It looks like it's already set up! So I click on the browse button and find that cbd.exe doesn't exist!
(http://i18.photobucket.com/albums/b141/CasetB/Select.png)
 :shock:  I know that I'm probably doing something wrong so what should I do now?
Title: Re: Debugging
Post by: Frank3000 on January 17, 2006, 06:43:13 pm
Hi,
you have to install the Debugging Tools for Windows.
http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx
And add the installation path to: Compiler Settings->Programs->Additional Paths

Frank

Title: Re: Debugging
Post by: cborders on January 17, 2006, 07:13:50 pm
I just downloaded it and installed it.  Then under Settings->Compiler->Programs->Additional Paths I added the path to where it installed and now when I build the debug version I get a lot of linker warnings.
Code
-------------- Build: Debug in BSP_Test ---------------
main.cpp
Linking console executable: Debug\BSP.exe
LINK : LNK6004: Debug\BSP.exe not found or not built by the last incremental link; performing full link
LIBC.lib(fp8.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(wincrt0.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(wincmdln.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(stdenvp.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(stdargv.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(crt0msg.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(crt0init.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(crt0fp.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(crt0dat.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(winxfltr.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(winsig.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(convrtcp.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(onexit.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(nlsdata2.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(nlsdata1.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(ctype.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(crtmbox.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(cmiscdat.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(abort.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(a_str.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(a_map.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(a_env.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(secfail.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(seccook.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(seccinit.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(secchk.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(loadcfg.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(mbctype.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(ismbspc.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(ismbbyte.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(ioinit.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(_newmode.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(handler.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(sbheap.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(realloc.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(msize.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(malloc.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(heapinit.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(free.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(calloc.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(resetstk.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(tolower.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(isctype.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(atox.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
LIBC.lib(_fptostr.obj) : warning LNK4099: PDB 'libc.pdb' was not found with 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\LIBC.lib' or at 'C:\Documents and Settings\cborders\My Documents\Virtual Tower\BSP\Debug\libc.pdb'; linking object as if no debug info
Title: Re: Debugging
Post by: cborders on January 17, 2006, 08:11:56 pm
Ok, I had to download the .NET 1.1 SDK to get the libc.pdb file!  :x
Now it compiles with no warnings, but it still won't run with the debug build.  It runs fine with the Release build so I am not sure what the issue could be.  If someone needs more info please ask and I'll let you know, I just want to get this working!
Title: Re: Debugging
Post by: mandrav on January 17, 2006, 08:26:29 pm
Ok, I had to download the .NET 1.1 SDK to get the libc.pdb file!  :x
Now it compiles with no warnings, but it still won't run with the debug build.  It runs fine with the Release build so I am not sure what the issue could be.  If someone needs more info please ask and I'll let you know, I just want to get this working!

Now, I don't quite understand the question: is it a problem with C::B's debugger or a bug in your program?
Title: Re: Debugging
Post by: cborders on January 17, 2006, 08:34:35 pm
I don't know!  I am creating an app using Ogre and I'm not sure if it's something that I'm doing wrong with my setup in Code::Blocks or something that's going wrong with my code so I posted the situation on both forums to see if anyone could tell me for certain where the issue is.
Title: Re: Debugging
Post by: mandrav on January 17, 2006, 08:48:57 pm
Have you tried debugging your program? Does the debugger work? If it does, then please just say so because this topic is about the debugger...
Title: Re: Debugging
Post by: cborders on January 17, 2006, 09:02:30 pm
The debugger wasn't getting to my break point so I moved the break point to the very first line of the constructor and found out that it does in fact work.  It must be an error on the Ogre side, so I'll go hide over there.