Ubuntu 16.04 Ubuntu 16.04 gcc8中的英特尔TBB:std::uncaught_exception();不赞成
我想在我的Ubuntu 16.04服务器版中正确安装和配置最新稳定版本的Intel TBB,gcc版本为8.1.0(Ubuntu 8.1.0-5ubuntu1~16.04)。 我下载了TBB for linux的最新稳定版本:然后,按照本视频教程中给出的说明: 我在文件/home/marco/tbb2018_20180618oss/bin/tbbvars.sh中修改了这一行:Ubuntu 16.04 Ubuntu 16.04 gcc8中的英特尔TBB:std::uncaught_exception();不赞成,ubuntu-16.04,intel,c++17,tbb,gcc8,Ubuntu 16.04,Intel,C++17,Tbb,Gcc8,我想在我的Ubuntu 16.04服务器版中正确安装和配置最新稳定版本的Intel TBB,gcc版本为8.1.0(Ubuntu 8.1.0-5ubuntu1~16.04)。 我下载了TBB for linux的最新稳定版本:然后,按照本视频教程中给出的说明: 我在文件/home/marco/tbb2018_20180618oss/bin/tbbvars.sh中修改了这一行: #TBBROOT=SUBSTITUTE_INSTALL_DIR_HERE 进入 然后,按照我执行的相同视频教程: ma
#TBBROOT=SUBSTITUTE_INSTALL_DIR_HERE
进入
然后,按照我执行的相同视频教程:
marco@PC:~/tbb2018_20180618oss/bin$ . ./tbbvars.sh intel64
marco@PC:~/tbb2018_20180618oss/bin$
在主目录tbb2018_20180618oss中,我创建了一个test dir,并用一个简单的test.cpp
文件填充它:
marco@PC:~/tbb2018_20180618oss/test$ nano test.cpp
其中,test.cpp
为:
#include <tbb/tbb.h>
#include <tbb/parallel_for.h>
int main() {
return 0;
}
我错过了什么?如何解决这个问题?
期待您的帮助。
马可可以安全地忽略警告。目前,TBB在C++17中使用了一些不推荐的东西。我们将尝试在将来的版本中修复警告。可以安全地忽略这些警告。目前,TBB在C++17中使用了一些不推荐的东西。我们将尝试在未来的版本中修复警告。这只是一个警告…这只是一个警告…感谢Alex的澄清Tanks Alex的澄清
#include <tbb/tbb.h>
#include <tbb/parallel_for.h>
int main() {
return 0;
}
marco@PC:~/tbb2018_20180618oss/test$ g++ -std=c++17 test.cpp -ltbb -otest
In file included from /home/marco/tbb2018_20180618oss/include
/tbb/tbb.h:77,
from test.cpp:1:
/home/marco/tbb2018_20180618oss/include/tbb/task_group.h: In destructor
‘tbb::internal::task_group_base::~task_group_base()’:
/home/marco/tbb2018_20180618oss/include/tbb/task_group.h:131:53: warning:
‘bool
std::uncaught_exception()’ is deprecated [-Wdeprecated-declarations]
bool stack_unwinding_in_progress = std::uncaught_exception();
^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/new:40,
from /usr/include/c++/8/ext/new_allocator.h:33,
from /usr/include/x86_64-linux-gnu/c++/8/bits
/c++allocator.h:33,
from /usr/include/c++/8/bits/allocator.h:46,
from /usr/include/c++/8/memory:63,
from /home/marco/tbb2018_20180618oss/include
/tbb/tbb_stddef.h:427,
from /home/marco/tbb2018_20180618oss/include
/tbb/aligned_space.h:24,
from /home/marco/tbb2018_20180618oss/include
/tbb/tbb.h:35,
from test.cpp:1:
/usr/include/c++/8/exception:102:8: note: declared here
bool uncaught_exception() _GLIBCXX_USE_NOEXCEPT __attribute__
((__pure__));
^~~~~~~~~~~~~~~~~~
In file included from /home/marco/tbb2018_20180618oss/include
/tbb/tbb.h:77,
from test.cpp:1:
/home/marco/tbb2018_20180618oss/include/tbb/task_group.h:131:72: warning:
‘bool
std::uncaught_exception()’ is deprecated [-Wdeprecated-declarations]
bool stack_unwinding_in_progress = std::uncaught_exception();
^
In file included from /usr/include/c++/8/new:40,
from /usr/include/c++/8/ext/new_allocator.h:33,
from /usr/include/x86_64-linux-gnu/c++/8/bits
/c++allocator.h:33,
from /usr/include/c++/8/bits/allocator.h:46,
from /usr/include/c++/8/memory:63,
from /home/marco/tbb2018_20180618oss/include
/tbb/tbb_stddef.h:427,
from /home/marco/tbb2018_20180618oss/include
/tbb/aligned_space.h:24,
from /home/marco/tbb2018_20180618oss/include
/tbb/tbb.h:35,
from test.cpp:1:
/usr/include/c++/8/exception:102:8: note: declared here
bool uncaught_exception() _GLIBCXX_USE_NOEXCEPT __attribute__
((__pure__));
^~~~~~~~~~~~~~~~~~
In file included from /home/marco/tbb2018_20180618oss/include
/tbb/tbb.h:77,
from test.cpp:1:
/home/marco/tbb2018_20180618oss/include/tbb/task_group.h:131:72: warning:
‘bool
std::uncaught_exception()’ is deprecated [-Wdeprecated-declarations]
bool stack_unwinding_in_progress = std::uncaught_exception();
^
In file included from /usr/include/c++/8/new:40,
from /usr/include/c++/8/ext/new_allocator.h:33,
from /usr/include/x86_64-linux-gnu/c++/8/bits
/c++allocator.h:33,
from /usr/include/c++/8/bits/allocator.h:46,
from /usr/include/c++/8/memory:63,
from /home/marco/tbb2018_20180618oss/include
/tbb/tbb_stddef.h:427,
from /home/marco/tbb2018_20180618oss/include
/tbb/aligned_space.h:24,
from /home/marco/tbb2018_20180618oss/include
/tbb/tbb.h:35,
from test.cpp:1:
/usr/include/c++/8/exception:102:8: note: declared here
bool uncaught_exception() _GLIBCXX_USE_NOEXCEPT __attribute__
((__pure__));
^~~~~~~~~~~~~~~~~~
marco@PC:~/tbb2018_20180618oss/test$
`