C++ 原子线围栏不是std的成员
使用以下工具进行编译:C++ 原子线围栏不是std的成员,c++,C++,使用以下工具进行编译: g++ -std=c++0x -Wall -pthread test2.cc -o hello 我得到了这个错误: test2.cc: atomic_thread_fence is not a member of std 我在Ubuntu中使用g++4.5.2。我错过了什么 test2.cc中是否有以下内容 #include <atomic> #包括 test2.cc中是否有以下内容 #include <atomic> #包括 这看起来像一
g++ -std=c++0x -Wall -pthread test2.cc -o hello
我得到了这个错误:
test2.cc: atomic_thread_fence is not a member of std
我在Ubuntu中使用g++4.5.2。我错过了什么 test2.cc中是否有以下内容
#include <atomic>
#包括
test2.cc中是否有以下内容
#include <atomic>
#包括
这看起来像一个外部库-您是否根据其文档安装了它?您是否像文档中描述的那样使用它?在问题中添加test2.cc
的源代码。这是一本书中的一个示例,它编写了std::atomic_thread_Fence这看起来像一个外部库-您是否根据文档安装了它?您是否像文档中描述的那样使用它?在问题中添加test2.cc
的源代码。这是一本书中的一个例子,它编写了std::atomic\u thread\u fence