Cannot run qmake in Mac Terminal
Did you set the environment variable PATH
with the path to Qt?
in Terminal do: echo $PATH
and look for something like /usr/local/Qt-5.x.x/bin:PATH
If there is not any path to your installed qt, set it like this:
In .profile (if your shell is bash), add the following lines:
PATH=/usr/local/Qt-5.0.2/bin:$PATH
export PATH
To help you in the process you probably would like to read here: QT mac install
ANSWER TO NEW QUESTION
If writing code nothing seems to be recognized you should add the link to your include
directory. The include
directory is where there are all the header file, so your IDE can give you suggestion about class method etc...
It is generally not needed at all to touch the PATH on any system (Mac, Unix, Windows) merely to use Qt. You may have multiple Qt versions installed in parallel (say 4.8 from macports, 5.2, git stable, etc.).
A way of building a Qt project on Unix is (substitute relevant paths for your setup):
mkdir ~/build-dir
cd ~/build-dir
~/Qt5.2.1/5.2.1/clang_64/bin/qmake ~/src/myproject/myproject.pro
make -j2
# were N in -jN is the number of CPU cores on your system