D_WIN32_WINNT compiler warning with Boost(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.
这篇关于D_WIN32_WINNT 编译器警告与 Boost的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:D_WIN32_WINNT 编译器警告与 Boost


基础教程推荐
- 这个宏可以转换成函数吗? 2022-01-01
- 如何在 C++ 中初始化静态常量成员? 2022-01-01
- 常量变量在标题中不起作用 2021-01-01
- 在 C++ 中计算滚动/移动平均值 2021-01-01
- 如何检查GTK+3.0中的小部件类型? 2022-11-30
- 静态库、静态链接动态库和动态链接动态库的 .lib 文件里面是什么? 2021-01-01
- 如何通过C程序打开命令提示符Cmd 2022-12-09
- C++结构和函数声明。为什么它不能编译? 2022-11-07
- 我有静态或动态 boost 库吗? 2021-01-01
- 如何将 std::pair 的排序 std::list 转换为 std::map 2022-01-01