D_WIN32_WINNT编译器升压警告 [英] D_WIN32_WINNT compiler warning with Boost

查看:599
本文介绍了D_WIN32_WINNT编译器升压警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不知道做这个错误是什么。新增 -D_WIN32_WINNT = 0x0501 根据项目属性Visual Studio的命令行选项,但它说,它不承认它,并警告仍然出现。

我也不清楚如何添加preprocessor定义。


  

1>请定义_WIN32_WINNT或
  _WIN32_WINDOWS适当。例如:结果
  1> - 添加-D_WIN32_WINNT = 0x0501
  编译器命令行;或结果
  1> -
  添加_WIN32_WINNT = 0x0501到你
  项目的preprocessor定义。



解决方案

我觉得你真的很接近得到这个工作。约翰Dibling了三种方法可以做到这一点,它看起来像你试图第三个解决方案,它是去到项目的设置...,并在配置属性 - > C / C ++ - > preProcessor ​​标题,添加; _ WIN32_WINNT = 0x0501 。你回答说,你还是收到这个错误,并提供你的preprocessor设​​置的内容, WIN32,_DEBUG; _CONSOLE; _WIN32_WINNT = 0x0501 。我想你可以解决这个问题,如果你改变 _WIN32_WINNT = 0x0501 _WIN32_WINNT = 0x0501 。当我试图用空格的版本,它并没有消除错误,但删除的空间做了。

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>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.

解决方案

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编译器升压警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆