2014年9月20日土曜日

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

I met the error today as the title of this post while coding.


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

I updated Xcode yesterday and my mac's SDK version has now become 10.9.  But it seems Qt can't detect this change automatically...

To solve this, I just needed to edit configurations in some text files.
  • Grab the version of GCC
    • Open 'Terminal.app' and type following command:

      gcc --version

      now, you can see the result like:
    • Take the memo the information above especially following 2 parameters:
         - SDK Version
         - Target

      In my case:
         - SDK Version  -> MacOSX10.9.sdk
         - Target   -> x86_64-apple-darwin13.4.0
  • Open 'qdevice.pri' file with text editor.  'qdevice.pri' might be in "(Qt folder)/5.3/clang_64/mkspecs/"
    • Change the values for QMAKE_MAC_SDK and GCC_MACHINE_DUMP like followings:
      
      !host_build:QMAKE_MAC_SDK = macosx10.9
      GCC_MACHINE_DUMP = x86_64-apple-darwin13.4.0
      
      ...of cause you have to change these parameters appropriately according to the result of GCC version.   

I could fix the error by proceeding above steps.

Hope this post help someone...  And let me know if there are any mistakes in this post.  Thanks!




0 件のコメント:

コメントを投稿