Project ERROR: Cannot run compiler '/Applications/Xcode 8.3.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++'. Maybe you forgot to setup the environment?



  • Mac Osx:- macOS Sierra version 10.12
    Latest Qt Setup
    Creating sample app
    during build & run:-
    /bin/sh: QMAKE_MAC_SDK_PATH: command not found
    Project ERROR: Cannot run compiler '/Applications/Xcode 8.3.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++'. Maybe you forgot to setup the environment?
    Error while parsing file /Users/kipl/Desktop/QT/third/third.pro. Giving up.



  • Hi, I also have Sierra, but in my Qt 5.9.1 the compiler has the path: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++

    Maybe try updating your Xcode to 8.3.3 (2 months old)?

    Also, If you open a Terminal and type

    clang++ -v
    

    what does the InstalledDir say...


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Did you start Xcode once ? Accept the license agreement ?



  • hi, thanks for your reply
    clang++ -v
    output is:-
    Apple LLVM version 8.1.0 (clang-802.0.42)
    Target: x86_64-apple-darwin16.0.0
    Thread model: posix
    InstalledDir: /Applications/Xcode 8.3.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

    & we are already using Xcode for other applications, develop in IONIC



  • Hi, Qt expects the compiler to be installed in /Application/Xcode.app/... that's probably why you get the error. It might work pointing Qt to the correct directory, open a Terminal and type:

    sudo xcode-select -s /Applications/Xcode\ 8.3.2.app/Contents/Developer
    

    If that doesn't work, you could also try creating a symbolic link in /Applications named Xcode.app that points to Xcode\ 8.3.2.app...



  • @hskoglund Hi, thanks
    xcode-select -p
    already print
    /Applications/Xcode 8.3.2.app/Contents/Developer


  • Lifetime Qt Champion

    Maybe you are hitting QTBUG-61690


Log in to reply
 

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