【问题标题】:intel icpc compiler errors with boost on ubuntu在 ubuntu 上使用 boost 的英特尔 icpc 编译器错误
【发布时间】:2013-04-19 16:55:55
【问题描述】:

我正在尝试让 Boost 在 Ubuntu 上与英特尔的编译器 icpc 一起工作。我的管理员从this webpage 安装了这个包。我现在尝试运行basic example from the Boost's webpage,编译如下:

icpc -I /usr/include/boost example.cpp -L/usr/lib/ -lboost_regex,

我得到一堆这种形式的编译器错误:

/usr/include/boost/smart_ptr/detail/shared_count.hpp(233): error: copy constructor for class "boost::detail::shared_count" may not have a parameter of type "boost::detail::shared_count"
  shared_count(shared_count && r): pi_(r.pi_) // nothrow
/usr/include/boost/smart_ptr/detail/shared_count.hpp(233): error: expected a ")"
  shared_count(shared_count && r): pi_(r.pi_) // nothrow
/usr/include/boost/smart_ptr/detail/shared_count.hpp(233): error: identifier "r" is undefined
  shared_count(shared_count && r): pi_(r.pi_) // nothrow
/usr/include/boost/smart_ptr/detail/shared_count.hpp(340): error: copy constructor for class "boost::detail::weak_count" may not have a parameter of type "boost::detail::weak_count"
  weak_count(weak_count && r): pi_(r.pi_) // nothrow

等等。令人惊讶的是(或不是),这件事在 g++ 上运行良好,只需编写:

g++ example.cpp -o example.out -lboost_regex

如果您能帮我解决这个问题,我将不胜感激。干杯!

【问题讨论】:

    标签: boost compiler-errors icc


    【解决方案1】:

    您发布的链接指向boost 1.40,而您遇到的问题似乎是to be fixed since 1.47。 (注意current boost version is 1.53。)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-01-22
      • 1970-01-01
      • 1970-01-01
      • 2016-11-20
      • 2020-02-05
      • 2014-02-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多