如何编译加强与C ++的旧性病? (特别是C ++ 03) [英] How to compile Boost with an older std of C++? (C++03 in particular)

查看:291
本文介绍了如何编译加强与C ++的旧性病? (特别是C ++ 03)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在依赖的Boost(<一个项目一个工作href=\"http://kratos-wiki.cimne.upc.edu/index.php/Main_Page\">http://kratos-wiki.cimne.upc.edu/index.php/Main_Page),这个项目目前只支持C ++ 03与海湾合作委员会的最后一次更新++(第5节)的C ++ 11已经成为了默认的性病,在技术上解决了我修改CXX_FLAGS添加问题:


  

-std = C ++ 03


问题带有Boost库,这我不能与C ++ 03的std编译(我想,我不知道如何检查与我的std编译)。我尝试采用以下命令来编译升压:


  

./ B2安装阶段--with-python的--with序列化CXXFLAGS = - STD = C ++ 03


我曾尝试过修改Jamroot中文件,添加以下行:


 &LT;&工具GT; GCC:其中,CXXFLAGS&GT; -std = GNU + 03
  &LT;&工具GT;铛:其中,CXXFLAGS&GT; -std = C ++ 03


但问题依然存在,当我编译整个项目中,我得到以下那种警告(多次):


  

/usr/local/include/boost/type_traits/detail/template_arity_spec.hpp:13:84:注:的#pragma消息:注意:这个头(template_arity_spec.hpp)的使用是德precated
   #编译消息(注意:使用此头(template_arity_spec.hpp)是pcated德$ P $)


这就是为什么我怀疑我的更改不会生效。

非常感谢你的帮助。


解决方案

我觉得你可以放心地忽略这些警告现在。我编译升压1_60_0用gcc 5.2.1和std = C ++ 11,我也得到同样的警告。有就可以了,但同时它并没有给我带来任何问题此时。我注释掉的助推code两个[的#pragma警告]行,所以我并不在我的构建得到了很多令人分心输出的:

升压/ type_traits /细节/ template_arity_spec.hpp 13号线:

  //嘈杂:#编译消息(注意:使用此头(template_arity_spec.hpp)是pcated德$ P $)

升压/ type_traits /细节/ bool_trait_def.hpp 18行:

  //嘈杂:#编译消息(注意:使用此头(bool_trait_def.hpp)是pcated德$ P $)

更新的问题仍然存在升压1.61.0。我再次使用了完全相同的修补程序。

I am working in a project dependent of Boost (http://kratos-wiki.cimne.upc.edu/index.php/Main_Page), this project currently only supports C++03. With the last update of gcc++ (v.5) the C++11 has become the default std, technically I solved the problem modifying the CXX_FLAGS adding:

-std=c++03

The problem comes with the Boost library, which I am not able to compile with the C++03 std (I think, I don't know how to check with which std I have compiled). I tried employing the following command to compile Boost:

./b2 install stage --with-python --with-serialization cxxflags="-std=c++03"

I have tried too modify the Jamroot file, adding the following lines:

  <toolset>gcc:<cxxflags>-std=gnu++03
  <toolset>clang:<cxxflags>-std=c++03

But the problem persist, when I compile the whole project I obtain the following kind of warning (several times):

/usr/local/include/boost/type_traits/detail/template_arity_spec.hpp:13:84: note: #pragma message: NOTE: Use of this header (template_arity_spec.hpp) is deprecated # pragma message("NOTE: Use of this header (template_arity_spec.hpp) is deprecated")

That's why I suspect that my changes do not take effect.

Thank you very much for your help

解决方案

I think you can safely ignore those warnings for now. I am compiling boost 1_60_0 with gcc 5.2.1 and std=c++11, and I get the same warnings. There is a ticket on it, but meanwhile it hasn't caused me any problems at this time. I commented out the two [#pragma warning] lines in the boost code, so I don't get a lot of distracting output in my build:

boost/type_traits/detail/template_arity_spec.hpp line 13:

// noisy: # pragma message("NOTE: Use of this header (template_arity_spec.hpp) is deprecated")

boost/type_traits/detail/bool_trait_def.hpp line 18:

// noisy: # pragma message ("NOTE: Use of this header (bool_trait_def.hpp) is deprecated")

UPDATE The problem still exists in boost 1.61.0. I used the same exact fix again.

这篇关于如何编译加强与C ++的旧性病? (特别是C ++ 03)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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