oskar
oskar

Reputation:

How to define preprocessor directives in VC++ 2008?

I'm using Visual C++ 2008 Express Edition. The WIN32 preprocessor directive doesn't appear to be defined by default, so when I surround includes with #ifndef WIN32, it still includes them.

I found someone with the exact same problem below, but it was so long ago that the location of this setting has changed:

http://www.gamedev.net/community/forums/topic.asp?topic_id=418604

Upvotes: 3

Views: 4547

Answers (2)

sean e
sean e

Reputation: 11925

In VS 2008 Pro, you right-click on the project and select Properties. Then look for Preprocessor Definitions in Configuration Properties | C/C++ | Preprocessor.

Upvotes: 4

Assaf Lavie
Assaf Lavie

Reputation: 75913

Try _WIN32 instead (notice the underscore...)

From MSDN.

Upvotes: 3

Related Questions