I just updated to the latest version of command line tools in OS X Mavericks and now when compiling my (previously-working) code it throws the following error
> clang: warning: no such sysroot directory:
> '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk'
> In file included from ../QtOpenGL/Main.cpp:1: In file included from
> ../../Qt/5.3/clang_64/lib/QtWidgets.framework/Versions/5/Headers/QApplication:1:
> In file included from
> ../../Qt/5.3/clang_64/lib/QtWidgets.framework/Versions/5/Headers/qapplication.h:45:
> In file included from
> /Users/BB/Qt/5.3/clang_64/lib/QtCore.framework/Headers/qcoreapplication.h:45:
> In file included from
> /Users/BB/Qt/5.3/clang_64/lib/QtCore.framework/Headers/qglobal.h:76:
> /Users/BB/Qt/5.3/clang_64/lib/QtCore.framework/Headers/qsystemdetection.h:196:12:
> fatal error: 'TargetConditionals.h' file not found
> # include <TargetConditionals.h>
> ^ 1 error generated. make: *** [Main.o] Error 1 20:29:52: Le processus "/usr/bin/make" s'est terminé avec le code 2. Erreur lors
> de la compilation/déploiement du projet QtOpenGL (kit : Desktop Qt
> 5.3.0 clang 64bit) When executing step "Make"
Does anyone knows that if changing this line
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
from sdk 8 to 9 would work? If so, where in the parameters of Qt5 can I change this?
For other people's reference, I solved the issue by editing my platform mkspec file:
/users/nic/Qt/5.3/clang_64/mkspecs/qdevice.pri
change the following line:
!host_build:QMAKE_MAC_SDK = macosx10.8
to this:
!host_build:QMAKE_MAC_SDK = macosx10.9
Be sure to clean your project and run qmake again.
Nic.
It is possible to compile the project also by adding the following line to the .pro
file
QMAKE_MAC_SDK = macosx10.9
If you compile in other platforms than OS X, an improvement of BRabbit27 solution would be:
macx {
QMAKE_MAC_SDK = macosx10.9
}
I just upgraded to XCode 9 and I started getting this problem on macOS Sierra (10.12). The problem is that Xcode moved the default symlink to 10.13. To fix:
cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
sudo ln -s MacOSX.sdk MacOSX10.12.sdk
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With