2014-11-20 4 views
1

요세미티의 XCode 6에 C++ 11 및 Qt 5.3 프로젝트를 구축하려고합니다. XCode 프로젝트는 qmake에 의해 생성됩니다 (QMAKE_MAC_SDK의 값을 파일의 macosx10.10으로 변경해야했습니다). XCode의 빌드 설정에서 C++ 언어는 C++11이고 표준 lib는 libc++입니다.XCode 6 on Yosemite : C++ 11 지원이 중단 되었습니까?

지금 엑스 코드는 내가 로그에서 나는 또한 엑스 코드는 다음과 같은 연타 옵션을 사용하고 볼 수있는 요세미티는 OS X 10.10 믿고 나에게 다음과 같은 오류가

clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)

을주고있다 :

-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk

MacOSX10.10.sdk 위 폴더가 존재합니다. 어디서 잘못되었는지 궁금합니다 ...

답변

0

OSX의 최소 목표를 알려주지 않았습니다. libc++을 사용하려면 10.7이어야합니다. OSX의 첫 번째 버전이기 때문에 라이브러리가 선적되었습니다.

추가해야 할 명령 줄 옵션은 다음과 같습니다

-mmacosx-version-min=10.7 

내가 그러나 this에 따르면,이 mkspec 조정에 의해 이루어집니다, 당신은 qmake를를 사용 clang에 해당 옵션을 얼마나 확실하지 오전 :

을 질문 :

I would like to add the compiler option -mmacosx-version-min=10.6 . I have tried setting

QMAKE_CXXFLAGS += -mmacosx-version-min=10.6

in my .pro file. The problem is that this option is also given a value by the mkspecs config files – common/g++-macx.conf sets it to -mmacosx-version-min=10.5. The result is that the compiler command line will contain both my setting and the mkspecs setting. The mkspecs settings appears last and will get effect. How can I tell the compiler to use “-mmacosx-version-min=10.6”?

(일) 답 :

Tweak the mkspec, or create a new one by copying the original, changing the min version and name.

+0

힌트 주셔서 감사합니다 :) XCode의 프로젝트 구축 설정에서 "배포"섹션 아래에 "OS X 배포 대상"옵션이 있습니다. "10.6"이었고 버전을 10.6 이상으로 변경하여 문제를 해결했습니다. . 나중에 qmake 솔루션을 살펴 보겠습니다. 감사합니다. – murphytalk

관련 문제