HELP!!!! Getting started - Build failure...
-
wrote on 23 Sept 2014, 08:16 last edited by
Hi,
Just to be over clear, shall I run in the terminal "export SDKROOT ..." command
I have tried the suggested solutions that raimeida suggests. No luck
My error is on Mac 10.9.4 in NetBeans 7.3.1 and a Qt application, and I'm getting:
Project ERROR: Could not resolve SDK path for 'macosx10.8'
make[1]: *** [nbproject/qt-Debug.mk] Error 3 -
wrote on 23 Sept 2014, 08:20 last edited by
Just to be clear, same in Qt Creator if I test by making a Qt App there
Project ERROR: Could not resolve SDK path for 'macosx10.8' -
Got Xcode 6 installed by any chance ?
-
wrote on 23 Sept 2014, 12:28 last edited by
Yep XCode 6.0.1
-
wrote on 23 Sept 2014, 12:50 last edited by
About SDKROOT
SDKROOT refers to where is MacOS SDK. In other words, SDKROOT refers to "where is Xcode SDK". So, you must have Xcode installed and you need to know Xcode path. Usually Xcode is installed inside /Applications directory.
To find wich SDK you have installed, in terminal (one line):
@
ls /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
@You must to export SDKROOK in your .bash_profile file. This file is in your $HOME directory; in my case:
/Users/ralmeida/.bash_profile
Fail proof:
- If your os version is Lion then your SDKROOT must contain MacOSX10.7.sdk
- If your os version is Mountain Lion then your SDKROOT must contain MacOSX10.8.sdk
- If your os version is Maverick then your SDKROOT must contain MacOSX10.9.sdk
- If your os version is Yosemite then your SDKROOT must contain MacOSX10.10.sdk
About QMAKE_MAC_SDK
From docs: "This variable is used on Mac OS X when building universal binaries.". It refers to which OS version you are trying to compile. If you have Mavericks then your os version is 10.9 (you can check this in "about this mac" menu).
About "Could not resolve SDK path for ‘macosx10.8’ "
If you are using Yosemite (macosx10.10), Mavericks (macosx10.9), Lion (macosx10.7) or older then your Qt is misconfigured because you are trying to compile for Mountain Lion (macosx10.8). Fix your *.pro files according to your osx version using QMAKE_MAC_SDK variable (see previous post).
Reference
http://en.wikipedia.org/wiki/OS_X
Qt 5.3.2 Reference Documentation: Qt 5.3 > Variables -
wrote on 23 Sept 2014, 18:06 last edited by
Thank's raimeida I'll give it further tries
My SDK is 10.9 so shall run in one line the command :
"export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk"Hope it'll work
/a
-
wrote on 23 Sept 2014, 18:13 last edited by
I recommend to export SDKROOT in .bash_profile.
If you export in terminal only works in that terminal session.
-
wrote on 23 Sept 2014, 18:23 last edited by
Other alternative is fix your mkspec platform file according to your mac os version:
Edit qdevice.pri file. In your Qt directory
@
nano /5.3/clang_64/mkspecs/qdevice.pri
@And change:
@
!host_build:QMAKE_MAC_SDK = macosx10.8
@to (assuming that you're using Maveric):
@
!host_build:QMAKE_MAC_SDK = macosx10.9
@ -
wrote on 24 Sept 2014, 06:15 last edited by
Hi raimeida,
Tried as suggested, though no success.
Added QMAKE_MAC_SDK = macosx10.9 to my projects .pro file (shouldn't it go into the project template for .pro? )Also added “export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk” in my .bas_profile file using nano
Just change of error message ;(
In Qt I get "error: [ui_mainwindow.h] Trace/BPT trap: 5"
Also tried to restart after I removed the .pro.user file and debug folders with no successand in NetBeans its another on the std includes!!???:
main.cpp:8:10: fatal error: 'QtGui/QApplication' file not found
#include <QtGui/QApplication>Come across the last one before in Linux and just changed it to #include <QApplication> and problem solved there. Sorry to say but not here on Mac
Any ideas?
-
wrote on 24 Sept 2014, 14:43 last edited by
[quote author="andsun" date="1411539322"]
Hi raimeida,Tried as suggested, though no success.
Added QMAKE_MAC_SDK = macosx10.9 to my projects .pro file (shouldn't it go into the project template for .pro? )Also added “export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk” in my .bas_profile file using nano
Just change of error message ;(
In Qt I get "error: [ui_mainwindow.h] Trace/BPT trap: 5"
Also tried to restart after I removed the .pro.user file and debug folders with no success
[/quote]Looks like a different kind of problem. Maybe you need to reconfigure your project settings. Did you "clean & qmake " before rebuild ?
[quote author="andsun" date="1411539322"]
and in NetBeans its another on the std includes!!???:
main.cpp:8:10: fatal error: 'QtGui/QApplication' file not found
#include <QtGui/QApplication>Come across the last one before in Linux and just changed it to #include <QApplication> and problem solved there. Sorry to say but not here on Mac
Any ideas?[/quote]
This is a code problem. Looks like your code was written for Qt4 and you are updating to Qt5. I suggest to read some docs related to migration from Qt4 to Qt5.
21/21