Cannot run qmake in Mac Terminal

前端 未结 6 1525
日久生厌
日久生厌 2021-02-13 02:30

I\'m learning Qt for my C++ course at college. I am trying to set up the environment for my first assignment but I can\'t seem to get it right. I swear I have run qmake in the

6条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-13 02:55

    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...

提交回复
热议问题