Reputation: 17100
How can I add another compiler and use it with QT?
I'm asking because I couldn't find it anywhere on the web how to do it.
Upvotes: 1
Views: 4397
Reputation: 1278
On MacOs, if you want to use gcc/g++ you can edit the Project (.pro) file to include (at the top):
QMAKE_CC = gcc
QMAKE_CXX = g++
Then run qmake against the Project file.
Upvotes: 0
Reputation: 4554
If you are using qmake, you can override the compiler used by the current mkspec with QMAKE_CXX, e.g. qmake QMAKE_CXX=g++-4.6
.
To permanently override it, you'll need a new or edit the mkspec files. You can browse where they are with qmake -query
and look at the QMAKE_MKSPECS variable. From there, the directory "default" is used if you do not use the -spec parameter in qmake. In that directory, the file qmake.conf will contain the mentioned QMAKE_CXX paramater that determines the compiler.
Upvotes: 3