Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/129.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
抑制来自boost的警告包括 我有一个C++应用程序(在Linux下用G+4.4.3,Boost 1.54构建),它发出了许多关于 Booost 的警告。警告包括: /usr/local/include/boost/math/constants/constants.hpp:314:3: warning: non-standard suffix on floating constant [-Wpedantic] BOOST_DEFINE_MATH_CONSTANT(rayleigh_skewness, 6.311106578189371381918993515442277798e-01, "6.31110657818937138191899351544227779844042203134719497658094585692926819617473725459905027032537306794400047264e-01") /usr/local/include/boost/concept/detail/general.hpp:71:20: warning: typedef 'boost_concept_check228' locally defined but not used [-Wunused-local-typedefs] BOOST_PP_CAT(boost_concept_check,__LINE__) ..._C++_Boost_Warnings - Fatal编程技术网

抑制来自boost的警告包括 我有一个C++应用程序(在Linux下用G+4.4.3,Boost 1.54构建),它发出了许多关于 Booost 的警告。警告包括: /usr/local/include/boost/math/constants/constants.hpp:314:3: warning: non-standard suffix on floating constant [-Wpedantic] BOOST_DEFINE_MATH_CONSTANT(rayleigh_skewness, 6.311106578189371381918993515442277798e-01, "6.31110657818937138191899351544227779844042203134719497658094585692926819617473725459905027032537306794400047264e-01") /usr/local/include/boost/concept/detail/general.hpp:71:20: warning: typedef 'boost_concept_check228' locally defined but not used [-Wunused-local-typedefs] BOOST_PP_CAT(boost_concept_check,__LINE__) ...

抑制来自boost的警告包括 我有一个C++应用程序(在Linux下用G+4.4.3,Boost 1.54构建),它发出了许多关于 Booost 的警告。警告包括: /usr/local/include/boost/math/constants/constants.hpp:314:3: warning: non-standard suffix on floating constant [-Wpedantic] BOOST_DEFINE_MATH_CONSTANT(rayleigh_skewness, 6.311106578189371381918993515442277798e-01, "6.31110657818937138191899351544227779844042203134719497658094585692926819617473725459905027032537306794400047264e-01") /usr/local/include/boost/concept/detail/general.hpp:71:20: warning: typedef 'boost_concept_check228' locally defined but not used [-Wunused-local-typedefs] BOOST_PP_CAT(boost_concept_check,__LINE__) ...,c++,boost,warnings,C++,Boost,Warnings,有这么多不同的。从这里看起来,您可以抑制特定的typedef警告: 但我希望能够抑制所有这些警告。有什么建议吗 正如评论员T.C.在gcc中所建议的那样。有(至少)两种向gcc构建添加其他系统包含路径的方法: -isystem命令行选项,以及 (其中“*”是C,CPLUS,或OBJC) 这些机制也适用于叮当声。使用-isystem而不是-I来指定boost的包含路径。您可以检查。这种方法也适用于VisualStudio和Xcode(这里没有类似的-isystem)。

有这么多不同的。从这里看起来,您可以抑制特定的typedef警告:


但我希望能够抑制所有这些警告。有什么建议吗

正如评论员T.C.在gcc中所建议的那样。有(至少)两种向gcc构建添加其他系统包含路径的方法:

  • -isystem
    命令行选项,以及
  • (其中“*”是
    C
    CPLUS
    ,或
    OBJC

  • 这些机制也适用于叮当声。

    使用
    -isystem
    而不是
    -I
    来指定boost的包含路径。您可以检查。这种方法也适用于VisualStudio和Xcode(这里没有类似的
    -isystem
    )。