Error: Could not resolve SDK path for 'macosx10.8'

前端 未结 10 2058
难免孤独
难免孤独 2020-11-28 08:47

So I just installed qt around 5 minutes ago, and when I wanted to code a simple line of text in the Push Button and try to run it, I got this error:

:-1: error: Coul

相关标签:
10条回答
  • 2020-11-28 09:18

    add

    QMAKE_MAC_SDK = macosx10.12
    

    to your .pro file. Done and Done. (for some, qdevice.pri does not contain the !host_build line, and adding it does nothing, so just set the variable directly in the .pro file).

    I have confirmed that you will eventually also have to implement this https://github.com/Homebrew/formula-patches/blob/master/qt5/xcrun-xcode-8.patch: which is just a matter of changing one line in your default_pre.prf file (for your appropriate machine aka Mac/PC, etc...)

    0 讨论(0)
  • 2020-11-28 09:22

    I recently upgraded from OSX 10.8 to 10.12 and ran into this using Qt 5.7

    The issue was resolved by a combination of:

    1) FranklinA's suggestion:

    Open Xcode->Preferences->Locations->command line tools..select the CLT xcode-select active developer directory error

    ..and..

    2) adding to the .pro file the following line: QMAKE_MAC_SDK = macosx10.12

    0 讨论(0)
  • 2020-11-28 09:23

    Coming to this late.

    I had this error an all I needed to do was open up the actual Xcode app (which for some reason was not findable by spotlight but was in the applications folder), accept some terms, and let it do some config.

    0 讨论(0)
  • 2020-11-28 09:23

    Using QT 5.7.0, Mac OSX Sierra (10.12), XCode 8.0, I got the typical error coming from searching in:

    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
    

    instead of:

    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
    

    Adding the line

    !host_build:QMAKE_MAC_SDK = macosx10.12
    

    to the Qt/5.7/clang_64/mkspecs/qdevice.pri file, worked for me.

    0 讨论(0)
提交回复
热议问题