Debugging With Dev-C++

Started by
17 comments, last by Kenny77 15 years, 9 months ago
What do I need to know to debug my games in Dev-C++? I have no previous experience with stuff like this, and just need a push in the right direction, thanks.
Advertisement
My recommended first step: Dump Dev-C++, move to MSVC++ (Express Edition is free). Then learn to use the MSVC debugger.
I second that notion.
It was a pain trying to set up SDL with VS so I figured ignorance is bliss. So I'll just stick with Dev-C++. Is it enough to just know GDB keywords?
Have you considered following some instructions? It would be a shame to dump the awesome Visual Studio debugger (which you will use regularly) just because its hard to set up SDL (which you learn to do once).

[Edited by - rip-off on June 19, 2008 1:03:18 PM]
Setting up SDL with MSVC:

Open MSVC's include folder
copy SDL's include files there (better to be inside an SDL folder, though, so you dont get their headers mixed with the regular MSVC headers)
copy SDL's .lib and .dll files to the lib folder (so you have a place for the DLL aswell)

Done, you may use SDL now.
Quote:Original post by nuno_silva_pt
Setting up SDL with MSVC:

Open MSVC's include folder
copy SDL's include files there (better to be inside an SDL folder, though, so you dont get their headers mixed with the regular MSVC headers)
copy SDL's .lib and .dll files to the lib folder (so you have a place for the DLL aswell)

Done, you may use SDL now.


That will work, however IMHO all that does is pollute the standard directories.

It is trivial to add additional header and library lookup paths to your project. I prefer to keep the libraries I link against in the same directory as my project or solution.
Quote:Original post by Kenny77
It was a pain trying to set up SDL with VS so I figured ignorance is bliss. So I'll just stick with Dev-C++. Is it enough to just know GDB keywords?


So why are you asking for advice, again? That's hardly going to preserve your precious ignorance.

But since you seem to want to learn *anyway*, how about you learn to use a tool that's actually been maintained for the last 3 years?
If you do drop Dev-C++ and go with MSVC, I wrote an article on how to use the debugger. Even if you don't go with MSVC you may still find it useful as the terminology tends to be the same in most debuggers.

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

Quote:Original post by superpig
If you do drop Dev-C++ and go with MSVC, I wrote an article on how to use the debugger. Even if you don't go with MSVC you may still find it useful as the terminology tends to be the same in most debuggers.


Thanks, I have that one printed.

I've gone through all the steps on Lazy Foo's site (the test program compiled), but still get complaints:

GameEngine.obj : error LNK2019: unresolved external symbol __imp___CrtDbgReportW referenced in function "public: class GameState * const & __thiscall std::_Vector_const_iterator >::operator*(void)const " (??D?$_Vector_const_iterator@PAVGameState@@V?$allocator@PAVGameState@@@std@@@std@@QBEABQAVGameState@@XZ)
IntroState.obj : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
MenuState.obj : error LNK2001: unresolved external symbol __imp___CrtDbgReportW
C:\Documents and Settings\...\My Documents\Visual Studio 2005\Projects\Compeletely Original Game


This compiled under Dev-C++ so I don't think it's anything wrong with the code

This topic is closed to new replies.

Advertisement