Search code examples
xcodeqmake

Issue setting QMAKESPEC environment variable


Refer to this post compile a Xcode project in command line Building Qt Xcode Projects From the Command Line the QMAKESPEC variable was unable to set to macx-g++.

I was doing like this in terminal QMAKESPEC=macx-g++ but this still not able to generate a make file of my Xcode project for me.

What is the right way to setup the QMAKESPEC environment variable?


Solution

  • You forgot to export that variable.

    Under bash:

    export QMAKESPEC=macx-g++