![](/img/trans.png)
[英]Error when building with vtk: "fatal error: tbb/atomic.h file not found"
[英]Can't use 'tbb/atomic.h' with Intel compiler
我無法訪問TBB原子類型的任何功能(獲取/加載/等)。 當我查看'tbb / atomic.h'時,該宏的每個實例都有錯誤:'__TBB_DECL_ATOMIC(...)'
錯誤: “僅在虛擬函數上允許使用純說明符(= 0)”
相反,可以使用MSVC編譯器訪問所有內容並進行良好的編譯。
這使用的是最新版本的Intel C ++編譯器,最新版本的TBB,64位OS,64位版本。 即使查看宏的代碼,我也無法分辨出它的來源。 我是否缺少編譯器標記或其他內容?
#define __TBB_DECL_ATOMIC(T) \
template<> struct atomic<T>: internal::atomic_impl_with_arithmetic<T,T,char> { \
atomic() = default; \
constexpr atomic(T arg): internal::atomic_impl_with_arithmetic<T,T,char>(arg) {} \
\
T operator=( T rhs ) {return store_with_release(rhs);} \
atomic<T>& operator=( const atomic<T>& rhs ) {store_with_release(rhs); return *this;} \
};
找到了問題。 編譯器可以很好地進行編譯,但是環境(VS2012)無法識別C ++ 11,因此我沒有得到Intellisense,並且得到了錯誤的錯誤信息。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.