【发布时间】: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