D_WIN32_WINNT 编译器警告与 Boost
不确定如何处理此错误.将 -D_WIN32_WINNT=0x0501
添加到 Visual Studio 的项目属性"下的命令行"选项,但它说它无法识别它并且警告仍然出现.
Not sure what to make of this error. Added -D_WIN32_WINNT=0x0501
to Visual Studio's "Command Line" options under Project Properties but it says it doesn't recognize it and the warning still appears.
我也不知道如何添加预处理器定义.
I am also not sure how to add the Preprocessor Definition.
1>请定义 _WIN32_WINNT 或_WIN32_WINDOWS 适当.例如:
1>- 添加-D_WIN32_WINNT=0x0501到编译器命令行;或
1>-将 _WIN32_WINNT=0x0501 添加到您的项目的预处理器定义.
1>Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. For example:
1>- add -D_WIN32_WINNT=0x0501 to the compiler command line; or
1>- add _WIN32_WINNT=0x0501 to your project's Preprocessor Definitions.
推荐答案
我认为你真的很接近让它发挥作用.John Dibling 提供了三种方法可以做到这一点,看起来您尝试了第三种解决方案,即进入项目的设置......并在 Configuration Properties->C/C++->PreProcessorstrong> 标题,添加 ;_WIN32_WINNT = 0x0501
".您回复说您仍然收到该错误并提供了您的预处理器设置的内容,WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT = 0x0501
.我认为如果您将 _WIN32_WINNT = 0x0501
更改为 _WIN32_WINNT=0x0501
就可以解决这个问题.当我尝试带有空格的版本时,它并没有消除错误,但删除了空格.
I think you're really close to getting this to work. John Dibling gave three ways you could do this and it looks like you tried the third solution, which was to "go in to your project's settings ... and under the Configuration Properties->C/C++->PreProcessor heading, add ;_WIN32_WINNT = 0x0501
". You replied that you were still getting that error and provided the contents of your preprocessor settings, WIN32;_DEBUG;_CONSOLE;_WIN32_WINNT = 0x0501
. I think you can solve this if you change _WIN32_WINNT = 0x0501
to _WIN32_WINNT=0x0501
. When I tried the version with spaces, it did not eliminate the error, but removing the spaces did.
相关文章