Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
5.2.1
-
None
-
Mac + clang
Description
When using precompiled header, it cannot have c+11 features or the build simply failed. CONFIG += c11 and QMAKE_CXXFLAGS += -std=c+11 have all been tried, but neither will work. Building without a precompiled header works fine, so it must be a bug in the build system.
The command line invoked by the build system is
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -pipe -O2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -mmacosx-version-min=10.7 -Wall -W -fPIE -I../Qt/5.2.1/clang_64/mkspecs/macx-clang -I../TestPre -I. -x objective-c+-header -c ../TestPre/stable.hpp -o TestPre/objective-c+.pch
. As one can see, there is no -std=c++11 flag passed in.
Precompiled headers works fine in Windows environment. This issue is Mac specific.
Attachments
Issue Links
- is replaced by
-
QTBUG-36575 qmake incorrectly uses CFLAGS (instead of CXXFLAGS) when building Objective-C++ PCH
- Closed