bia*_*ias 6 c++ boost googletest
如果我包括GTEST/gtest.h和升压/数学/发行/ poisson.hpp我得到
/opt/local/include/boost/tr1/tuple.hpp:63: error: ‘tuple’ is already declared in this scope
/opt/local/include/boost/tr1/tuple.hpp:67: error: ‘make_tuple’ is already declared in this scope
/opt/local/include/boost/tr1/tuple.hpp:68: error: ‘tie’ is already declared in this scope
/opt/local/include/boost/tr1/tuple.hpp:68: error: ‘tie’ is already declared in this scope
/opt/local/include/boost/tr1/tuple.hpp:68: error: ‘tie’ is already declared in this scope
/opt/local/include/boost/tr1/tuple.hpp:68: error: ‘tie’ is already declared in this scope
/opt/local/include/boost/tr1/tuple.hpp:68: error: ‘tie’ is already declared in this scope
/opt/local/include/boost/tr1/tuple.hpp:68: error: ‘tie’ is already declared in this scope
/opt/local/include/boost/tr1/tuple.hpp:68: error: ‘tie’ is already declared in this scope
/opt/local/include/boost/tr1/tuple.hpp:68: error: ‘tie’ is already declared in this scope
/opt/local/include/boost/tr1/tuple.hpp:68: error: ‘tie’ is already declared in this scope
/opt/local/include/boost/tr1/tuple.hpp:68: error: ‘tie’ is already declared in this scope
/opt/local/include/boost/tr1/tuple.hpp:72: error: ‘tuple_size’ is already declared in this scope
/opt/local/include/boost/tr1/tuple.hpp:73: error: ‘tuple_element’ is already declared in this scope
Run Code Online (Sandbox Code Playgroud)
如何防止这两个库命名空间发生冲突?
Tro*_*our 10
尝试用已BOOST_HAS_TR1_TUPLE
定义的构建.它看起来像boost和你的std
库都在定义std::tr1::tuple
,我看不到如何禁用该std
版本.看看boost标题虽然看起来BOOST_HAS_TR1_TUPLE
需要定义来告诉std::tr1::tuple
已经定义的boost .
当我尝试编译包含这些标题的文件时,我遇到了类似的错误,然后在我定义时它们就消失了BOOST_HAS_TR1_TUPLE
.
归档时间: |
|
查看次数: |
3085 次 |
最近记录: |