in ubuntu 12.04 make cannot find Qt libraries

前端 未结 2 842
傲寒
傲寒 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条回答
  • 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.

    0 讨论(0)
  • 2021-01-18 18:27

    Install Qt using apt-get

    sudo apt-get install libqt4-core libqt4-gui 
    

    or if you want everything

    sudo apt-get install libqt4-*
    
    0 讨论(0)
提交回复
热议问题