Archived

This topic is now archived and is closed to further replies.

#define DEBUG

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

how should i do a #define you want to apply to all files in vc++ 6? i cant just do it in main.cpp because what if its not compiled first. any tips?

Share this post


Link to post
Share on other sites
If you''re compiling using the IDE, you need to go to Project->Settings. In C/C++ General settings, you''ll find an edit box for Preprocessor Definitions. VC++ will automatically set the _DEBUG definition when you are performing a debug build.

Share this post


Link to post
Share on other sites
Also, a define in one cpp file will not be seen/recognized by any other cpp files, even it it''s compiled first. There was a good article on .cpp and .h files here at gamedev a while ago. It may be a worthwhile read. It took me 2 years of C programming before I totally realized the relationships between multiple source and header files. It''s actually very simple, and I should have learned it much earlier.

Share this post


Link to post
Share on other sites
thx for the replies all. makes sense.

I knew the main compiling first thing was stupid, sabreman, when i thought of how commandline compiling/linking works. i just didnt know what else to do.

Share this post


Link to post
Share on other sites