使用VC ++ 9增强警告

时间:2020-03-05 18:40:16  来源:igfitidea点击:

当Boost库/标头与VC ++ 9编译器(Visual C ++ 2008 Express Edition或者Visual Studio 2008)一起使用时,会生成许多良性警告。它们有2种:

  • 关于Wp64设置的警告。
  • 关于编译器版本的警告。

如何关闭这些警告?

解决方案

回答

  • 关于Wp64设置的警告。
Turn off the /Wp64 setting which is set by default. You can find it in Project Properties -> C/C++ -> General.
  • 关于编译器版本的警告。
Go to the Boost trunk (online) and get the latest boost\boost\config\compiler\visualc.hpp header file. Diff it with the current file and merge the sections where _MSC_VER is equal to 1800. (1800 is the VC9 version number used in Boost configuration.)