Sign in to follow this  
blaze02

[.net] Compiling

Recommended Posts

Using Visual Studio 7, I was under the assumption that when I compiled a program in debug, the resulting .exe would take into account my #ifdef _DEBUG statements. Thats kind of a joke, I know that #ifdef's are tested at compile time. What I don't understand is: When I run my program through the compiler in debug mode, my program starts in windowed mode and allows fullscreen swapping (I set this up with #ifdef _DEBUG's in a couple places). When I leave the compiler and run the resulting .exe, the program starts up in fullscreen and does not allow swapping (the same as if I compiled in release mode). How is this possible when #ifdef's are tested at compile time?

Share this post


Link to post
Share on other sites
Are you you're using the debug version? You're correct; all # statements are preprocessor directives which are processed before the source even gets to the compiler.

Use Depends to verify that the application you're executing outside the IDE is the debug build. If it's a debug build it should link to the various Microsoft DLLs with a d suffix. (msvcrt71d.dll, etc.)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this