Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. HELP!!!! Getting started - Build failure...
QtWS25 Last Chance

HELP!!!! Getting started - Build failure...

Scheduled Pinned Locked Moved Installation and Deployment
21 Posts 6 Posters 11.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Constantly_Stuck
    wrote on 28 Feb 2014, 22:32 last edited by
    #1

    I am brand new to this, with a little hobby programming experience a long time ago and now wanting to take it up again, so need all the help I can get…

    I have (finally) managed to install QT creator:
    Qt Creator 3.0.1
    Based on Qt 5.2.1 (Clang 5.0 (Apple), 64 bit)

    I am running it on my Mac OS X 10.7.5

    When I try to run any of the example projects I receive the following error message during the build:

    Project ERROR: Could not resolve SDK path for 'macosx10.8'

    Please can anyone help, in easy to understand, 'unjargonated' language?

    Thank you in advance...

    1 Reply Last reply
    0
    • H Online
      H Online
      hskoglund
      wrote on 28 Feb 2014, 23:10 last edited by
      #2

      If you are on Lion 10.7.5 then running Xcode 5 will fail (and Qt as well).
      Either downgrade your Xcode to 4.6.3 or upgrade your Mac to Mountain Lion or Mavericks.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MunchyYDL
        wrote on 28 Feb 2014, 23:19 last edited by
        #3

        Hi,

        I'm also really new to this, but I got it to install ok and the examples work fine for me.

        What installer did you use from the Downloads page???
        I used the "Qt 5.2.1 for iOS (Mac, 909 MB)" version, as I couldn't get the download for the online version to work, and I wanted to have the iOS SDK:s installed as well as the OSX ones.

        If you have used the online installer, I guess there might be some options to select witch SDK:s to include in the install. And I guess there is a possibility you could install the Qt Creator without any backing SDK to go with it, maybe?

        So, check the installer again, and see if there is some kind of SDK options to include in the install?

        And if that doesn't work, try one of the offline installers for Mac, depending on if you want support for OSX and/or iOS, as these are separate downloads.

        Hope you get it to work, I know how frustrating it can be! :)

        Edit:
        [quote author="hskoglund" date="1393629008"]If you are on Lion 10.7.5 then running Xcode 5 will fail (and Qt as well).
        Either downgrade your Xcode to 4.6.3 or upgrade your Mac to Mountain Lion or Mavericks.
        [/quote]

        As hskoglund pointed out the conflicting versions, I can disclose that I run Qt 5.2.1 with Xcode 5.0.2 on Mavericks 10.9.2, and that combination works fine! =)

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 28 Feb 2014, 23:26 last edited by
          #4

          Hi and welcome to devnet,

          The missing SDK error mentioned by Constantly_Stuck has nothing to do with Qt's SDK.

          It's the OS X SDK which is provided by Xcode and Xcode does not provide all variants for all OS X versions.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • M Offline
            M Offline
            MunchyYDL
            wrote on 28 Feb 2014, 23:35 last edited by
            #5

            [quote author="SGaist" date="1393629981"]Hi and welcome to devnet,

            The missing SDK error mentioned by Constantly_Stuck has nothing to do with Qt's SDK.

            It's the OS X SDK which is provided by Xcode and Xcode does not provide all variants for all OS X versions.
            [/quote]

            Thanks for the information!

            I actually didn't know there were any kind of dependency on Xcode for running Qt on Mac, and I looked briefly on the Downloads page for any mention of this, but couldn't find any information.

            Can you please give me a link to where I could find that information?

            Is this dependency only for the development environment, or do they apply for the runtime as well?

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 28 Feb 2014, 23:46 last edited by
              #6

              It is not for running Qt on Mac, it is to do development. You need Xcode, or at least the command line tools installed, to have a working development environment.

              After that, once deployed, you application doesn't need Xcode to run.

              There's no particular information on the download page since Xcode is the only solution to develop on OS X

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • M Offline
                M Offline
                MunchyYDL
                wrote on 1 Mar 2014, 00:02 last edited by
                #7

                Well, I do know that XCode is needed to develop native apps for OSX or iOS. And I have now seen that what happens when you build a Qt application in Qt Creator, it creates a xcode-project.

                But a developer coming from a different background might not know this, if he/she mainly uses php/python/ruby for example, it might help them to understand that XCode is needed and why. =)

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  Constantly_Stuck
                  wrote on 2 Mar 2014, 22:02 last edited by
                  #8

                  Thank you all for your help!

                  I am using Qt 5.2.1 for Android and iOS (Mac, 1.3 GB)

                  I followed the advice of hskoglund and updated my OS to 10.9.2. (a long process with my internet speed, hence my delayed reply).

                  Now the QT Creator works fine and builds the project. I also had to update Xcode.
                  I am now working through examples etc and have encountered the following issue next:

                  • the build kit options do not give me an option to build for Android. I believe this is because I need to download some other bits and bats relating to JAVA etc before it will work?

                  Thank you all again for your help.

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    MunchyYDL
                    wrote on 4 Mar 2014, 18:43 last edited by
                    #9

                    Hi again Constantly_Stuck,

                    Nice to hear that you got it working! :)

                    There are some additional steps required to setup the Qt Creator for building an Android version of your project, you can read about it here: http://qt-project.org/wiki/Qt5ForAndroidBuilding.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 4 Mar 2014, 20:12 last edited by
                      #10

                      If you plan to support multiple platforms such as OS X, iOS and android, you should consider getting the online installer.

                      This will allow you to select several version of Qt and installed them at the same time. The offline installers will reinstall the new over the old.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • R Offline
                        R Offline
                        ralmeida
                        wrote on 18 Sept 2014, 03:51 last edited by
                        #11

                        Online installer is best option, but not always recognize all settings. You must to fix sometimes. In my case I have to fix SDKROOT and QMAKE_MAC_SDK.

                        I am using Xcode6, so in .bash_profile export SDKROOT to corresponding path:

                        @
                        export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk
                        @

                        I am using Maverick, so in *.pro:

                        @
                        QMAKE_MAC_SDK = macosx10.9
                        @

                        Next, restart QtCreator.

                        Finally, do a clean, qmake & build :)

                        1 Reply Last reply
                        0
                        • A Offline
                          A Offline
                          andsun
                          wrote on 23 Sept 2014, 08:16 last edited by
                          #12

                          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

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            andsun
                            wrote on 23 Sept 2014, 08:20 last edited by
                            #13

                            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'

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on 23 Sept 2014, 08:54 last edited by
                              #14

                              Got Xcode 6 installed by any chance ?

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              0
                              • A Offline
                                A Offline
                                andsun
                                wrote on 23 Sept 2014, 12:28 last edited by
                                #15

                                Yep XCode 6.0.1

                                1 Reply Last reply
                                0
                                • R Offline
                                  R Offline
                                  ralmeida
                                  wrote on 23 Sept 2014, 12:50 last edited by
                                  #16

                                  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

                                  1 Reply Last reply
                                  0
                                  • A Offline
                                    A Offline
                                    andsun
                                    wrote on 23 Sept 2014, 18:06 last edited by
                                    #17

                                    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

                                    1 Reply Last reply
                                    0
                                    • R Offline
                                      R Offline
                                      ralmeida
                                      wrote on 23 Sept 2014, 18:13 last edited by
                                      #18

                                      I recommend to export SDKROOT in .bash_profile.

                                      If you export in terminal only works in that terminal session.

                                      1 Reply Last reply
                                      0
                                      • R Offline
                                        R Offline
                                        ralmeida
                                        wrote on 23 Sept 2014, 18:23 last edited by
                                        #19

                                        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
                                        @

                                        1 Reply Last reply
                                        0
                                        • A Offline
                                          A Offline
                                          andsun
                                          wrote on 24 Sept 2014, 06:15 last edited by
                                          #20

                                          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

                                          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?

                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved