3

QT を使い始めたばかりで、まだコンパイル プロセスに慣れていません。現在、既存の QT プロジェクトを Mac に移植しようとしています。このアプリは、Linux と Windows でコンパイルおよび実行されます。

Mac OSX 10.8.2 でプロジェクトをコンパイルすると、この c++11 関連のエラーが発生します。

#include ../xxx/pch.h:71:10: fatal error: 'atomic' file not found
#include <atomic>
^
1 error generated.
make[1]: *** [debug/xxx/objective-c++.pch] Error 1
make: *** [debug] Error 2
11:32:01: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project xxx (kit: Qt5.1.0)
When executing step 'Make'

c++11 を有効にするために、.pro ファイルに以下のフラグを含めました。

QMAKE_CXXFLAGS += -std=c++11

CONFIG += c++11

c++ 11が有効になっていると思われるビルド済みのQT5.1Betaパッケージ(Clang)を使用してプロジェクトをビルドしています。

以下の場所 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/c++/v1/atomic および /usr/lib/c++/v1/atomic にアトミック ヘッダーが表示されます

完全なパス /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr//lib/c++/v1/atomic を含めてテストしてみました

以下のエラーが表示されます。

In file included from ../xxx/pch.h:71:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/atomic:535:2: 
error: atomic is not implemented

In file included from ../xxx/pch.h:124:
../../../yyy.h:308:12: error: no type named 'atomic' in namespace 'std'
std::atomic<bool> m_signaled;

ここで何が欠けていますか?

4

2 に答える 2