Mac (OS X 10.11.6)에서 Qscintilla 2.9.3 (얻은 here)을 컴파일하려고하는데 make 단계가 다음 오류와 함께 실패합니다 :Qscintilla make error : "Qt에 C++ 11 지원이 필요합니다"
주제에 다른 질문에 따라/Applications/Xcode.app/Contents/Developer/usr/bin/g++ -c -pipe -O2 -std=gnu++11 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.8 -fvisibility=hidden -fvisibility-inlines-hidden -w -fPIC -DQSCINTILLA_MAKE_DLL -DSCINTILLA_QT -DSCI_LEXER -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_MACEXTRAS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I. -I../include -I../lexlib -I../src -I/Applications/Utilities/Qt/5.7/clang_64/lib/QtPrintSupport.framework/Headers -I/Applications/Utilities/Qt/5.7/clang_64/lib/QtWidgets.framework/Headers -I/Applications/Utilities/Qt/5.7/clang_64/lib/QtMacExtras.framework/Headers -I/Applications/Utilities/Qt/5.7/clang_64/lib/QtGui.framework/Headers -I/Applications/Utilities/Qt/5.7/clang_64/lib/QtCore.framework/Headers -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/AGL.framework/Headers -I/Applications/Utilities/Qt/5.7/clang_64/mkspecs/macx-g++ -F/Applications/Utilities/Qt/5.7/clang_64/lib -o qsciscintilla.o qsciscintilla.cpp
In file included from qsciscintilla.cpp:23:
In file included from ./Qsci/qsciscintilla.h:29:
In file included from /Applications/Utilities/Qt/5.7/clang_64/lib/QtCore.framework/Headers/QByteArray:1:
In file included from /Applications/Utilities/Qt/5.7/clang_64/lib/QtCore.framework/Headers/qbytearray.h:44:
In file included from /Applications/Utilities/Qt/5.7/clang_64/lib/QtCore.framework/Headers/qrefcount.h:43:
In file included from /Applications/Utilities/Qt/5.7/clang_64/lib/QtCore.framework/Headers/qatomic.h:41:
In file included from /Applications/Utilities/Qt/5.7/clang_64/lib/QtCore.framework/Headers/qglobal.h:1145:
In file included from /Applications/Utilities/Qt/5.7/clang_64/lib/QtCore.framework/Headers/qatomic.h:46:
/Applications/Utilities/Qt/5.7/clang_64/lib/QtCore.framework/Headers/qbasicatomic.h:61:4: error:
"Qt requires C++11 support"
# error "Qt requires C++11 support"
^
/Applications/Utilities/Qt/5.7/clang_64/lib/QtCore.framework/Headers/qbasicatomic.h:90:13: error:
unknown type name 'QAtomicOps'
typedef QAtomicOps Ops;
, 나는 아무 소용의 qscintilla.pro 파일에
\# With C++11 support
greaterThan(QT_MAJOR_VERSION, 4){
CONFIG += c++11
} else {
QMAKE_CXXFLAGS += -std=c++0x
}
을 추가했습니다.
이 thread에서도 비슷한 문제가있는 것으로 보입니다. 종속성에서 -ansi
플래그를 억제하여 해결되었으므로 C++ 11을 사용할 수 없었습니다. 그러나 나는 위의 로그에 그런 깃발을 보지 않는다.
문제의 원인은 무엇입니까?
QMake 버전 3.0 및 Qt 5.7이 있습니다.
어떤 컴파일러를 사용하며 어떤 버전이 있습니까? – Hayt
위의 로그에 따르면 g ++가 호출됩니다. g ++ --version은 다음을 제공합니다 : --prefix =/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir =/usr/include/C++/4.2.1 Apple LLVM 버전 7.3.0 (clang-703.0.31) 대상 : x86_64-apple-darwin15.6.0 스레드 모델 : posix –
여기에 gcc 버전 번호가 표시되지 않습니다. '4.2.1'이 버전 번호라면 gcc에는 C++ 11이 없습니다. – Hayt