in ubuntu 12.04 make cannot find Qt libraries

前端 未结 2 843
傲寒
傲寒 2021-01-18 17:22

When I run make (after running qmake) I get the following error:

/usr/bin/ld: cannot find -lQtGui
/usr/bin/ld: cannot find -lQtCore

In syna

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-18 18:12

    The advice at http://www.qtforum.org/article/28081/installing-qt-4-5-2-on-linux.html is outdated and useless in your case since you have a recent version of Ubuntu. It leads to having two different versions of Qt side by side, which is technically possible but hard to manage.

    You should install the qtcreator Ubuntu package and just delete the /opt/qtsdk... directory and undo the modifications suggested by the outdated instructions. It is essential that your PATH is not tweaked so that it's the Ubuntu version of qmake that is found when called from the command line.

    If you still have compilation problems after that, they're likely to be solved by installing more packages, such as libqt4-dev or others Qt-related packages.

    Also, /usr/bin/ld is not a directory, it's the linker program.

提交回复
热议问题