J Lath
J Lath

Reputation: 21

C++ Visual Studios 2015: #ifdef WIN32 not executing properly

I am working on a large inherited C++ project and am trying to build it for the first time in VS 2015.I have all the build files, but my build is failing in visual studios because the conditional

#ifdef WIN32
 .....
#else error

I am trying to run on windows, but the program always is falling back to the else statements logic.

I have everything possible installed for C++ in visual studios. Any help is greatly appreciated.

Upvotes: 1

Views: 3298

Answers (1)

François Andrieux
François Andrieux

Reputation: 29022

VS 2015 defines _WIN32, not WIN32. See this list of predefined macros.

Upvotes: 7

Related Questions