Jump to content
  • Advertisement
Sign in to follow this  
marshdabeachy

Debug build success, release mode failure?

This topic is 4477 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

Using C++ and Visual Studio 2003. My game compiles fine in debug mode with 0 errors and 0 warnings. However, in release mode, I get a few errors which appear to stem from this one: Mode7.cpp(23) : error C2653: 'std' : is not a class or namespace name I presume this is just because Visual Studio can't find some library somewhere. Any idea what's up?

Share this post


Link to post
Share on other sites
Advertisement
No, but I'm calling std stuff explicitely. Like I said, it works fine in the debug build. Here's where it's dying...


template <>
struct std::greater<spriteInfo*> {
bool operator()(spriteInfo const* a, spriteInfo const* b) {
return b->distToCamera < a->distToCamera;
}
};

Share this post


Link to post
Share on other sites
Are your project settings different for each build type? Does one have different include paths to the other?

Share this post


Link to post
Share on other sites
Quote:
Original post by marshdabeachy
Yeah, I've got #ifndef in my header files. How would that relate?


Although you already found the problem, i'l explain how #if* could be related.
In debug builds _DEBUG symbol is automaticaly defined. So you can put something like

#ifdef _DEBUG
...
#else
...
#endif

Obviously, debug and release builds would then compile different code. That would explain why the code compiles in debug but not in release builds - your compiling different code!

So be careful with those macros.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!