Setup root macox SDK for qt



  • Hi to everyone,

    here my qt-error :

    :-1: Warnung: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk' [-Wmissing-sysroot]
    
    ----------------------------
    On my System exist just : '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk' 
    

    But I can't fix it with :

    macx {
        QMAKE_MAC_SDK = macosx10.13
    }
    

    Do you have an idea how can I fix this link error?

    Thx ;)


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Did you just recently update to Xcode 9 ?



  • Let me guess, Installing Xcode 9 breaks 5.9?

    GDI Apple drives me crazy... I need 9 for an iOS11 project... but can't use it with QT?


  • Moderators

    @eBuddha You can use it with Qt, you will probably need to build Qt yourself though.

    It's super easy to build it yourself. If you do that it will use the SDK on your system.



  • Can you post the output of
    ls -lh

    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/



  • @ambershark said in Setup root macox SDK for qt:

    build Qt yourself

    Good Morning,

    ok, but when i build it by myself, then i have to install qt ::
    https://doc.qt.io/archives/qtjambi-4.5.2_01/com/trolltech/qt/install-mac.html

    When I try this, i get the information that qt is not compatible with my installation.

    ;(

    THX ;)



  • I ended up solving my issue by deleting the build directory and setting the qmake mac configuration file to use 10.13.

    It seems that qmake only sets its sysroot environment variables in the Makefile when the project is first built. It did not change by cleaning the build , running qmake, and rebuilding.

    After deleting the build directory, qmake rebuilt with the 10.13 directory in the sysroot. you may be able to fix it by deleting just the ".qmake.stash" file.

    Check the file for the following settings:

    0_1506442433038_Screen Shot 2017-09-26 at 12.12.42.png

    1_1506442433039_Screen Shot 2017-09-26 at 12.11.16.png

    If they are not set to 10.13 then your QMake is not set to use the latest version.

    ETA: I set the configuration file at "Qt5.9/5.9/clang_64/mkspecs/macx-clang/qmake.conf

    0_1506442846832_Screen Shot 2017-09-26 at 12.20.18.png
    ETA II: Changing the qMake.conf is not needed. it should be set tot the mac you are deploying too. So 10.12 for Sierra and 10.13 for High Sierra.

    Cheers,
    EB



  • Hey, not bad!
    Thanks a lot.

    i also fixed the problem with creating a symbolic link to :
    '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk'

    from:
    '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk'

    but eBuddha your solution is more elegant.
    I will check this too.
    Big Thanks to all!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.