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

前端 未结 10 2095
难免孤独
难免孤独 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:17

    The problem is that the online installer for Qt currently supports OSX 10.8 (Mountain Lion) by default, and I'm guessing you are on 10.9 (Mavericks) or greater.

    There is a workaround:

    • Navigate to where you installed Qt (default /Users/your username/Qt) using finder
    • Go to the subdirectory 5.3/clang_64/mkspecs directory
    • Open the file called qdevice.pri with a text editor
    • Change the line !host_build:QMAKE_MAC_SDK = macosx10.8 to:
      • !host_build:QMAKE_MAC_SDK = macosx10.9 if you are on OS X 10.9 (Mavericks), or
      • !host_build:QMAKE_MAC_SDK = macosx if you are on OS X 10.10 (Yosemite)
    • Save the file and restart Qt Creator

提交回复
热议问题