Reputation: 91
I want to install Qt on my Mac and use the qmake through terminal to compile code. I downloaded the open source Qt Creator from Qt site, but I cannot set it up. Anyone with similar problems?
System: Mac OS X Sierra,
Qt version: 5.7.
I'm downloading the open source installer from qt.io/download-open-source . I'm installing it to Users/MyUserAccount and i want set it up so i can compile C++ code with qmake && make
Upvotes: 9
Views: 13431
Reputation: 994
For Installing QT4:- https://github.com/cartr/homebrew-qt4
brew tap cartr/qt4
brew tap-pin cartr/qt4
brew install qt@4
For Installing QT5:-
brew install qt5
Upvotes: 0
Reputation: 7730
Just to provide another solution using Homebrew.
As you've found QT4 isn't compatible with Mac OSX Sierra.
You can install QT5 using:
brew install qt5
But you'll find you can't access qmake from the command line. To rectify this you'll need to run:
brew link qt5 --force
Upvotes: 19
Reputation: 13238
If you want to run qmake
from command line, add the directory where qmake
is located to PATH
environment variable. How to do it depends on the shell you are using, for bash it is done by adding export PATH=$PATH:<path_to_qmake>
to either ~/.profile
, ~/.bash_profile
or ~/.bashrc
.
Upvotes: 1