当前位置: 动力学知识库 > 问答 > 编程问答 >

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.

网友答案:

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

分享给朋友:
您可能感兴趣的文章:
随机阅读: