Jump to content
  • Advertisement
Sign in to follow this  
Kenny77

Debugging With Dev-C++

This topic is 3766 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
My recommended first step: Dump Dev-C++, move to MSVC++ (Express Edition is free). Then learn to use the MSVC debugger.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!