In ubuntu 12.04 make cannot find Qt libraries

When I started make (after qmake started), I get the following error:

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

In synaptic, this shows that I installed libqtcore4 and libqtgui4.

There is no directory like / usr / bin / ld.

Basically, I installed QtSDK, and QtCreator seems to work just fine in that it can create a hello world program. But I want to be able to work with the CLI and run make. I suspect that I may need to redirect the make program to look elsewhere for QtGui and QtCore. If so, how do you find out where these libraries are? I am running Ubuntu 12.04 and I have followed the advice of this page http://www.qtforum.org/article/28081/installing-qt-4-5-2-on-linux.html up to the last section, where he talks about libraries. Any suggestions?

+4
source share
2 answers

Install Qt with apt-get

 sudo apt-get install libqt4-core libqt4-gui 

or if you want everything

 sudo apt-get install libqt4-* 
+13
source

The tip http://www.qtforum.org/article/28081/installing-qt-4-5-2-on-linux.html is deprecated and useless in your case since you have the latest version of Ubuntu. This results in two different versions of Qt side by side, which is technically possible but difficult to manage.

You must install the qtcreator Ubuntu package and simply delete the /opt/qtsdk... and discard the changes suggested by the obsolete instructions. It is very important that your PATH not configured so that the version of Ubuntu qmake on call from the command line.

If after this you still have compilation problems, they are likely to be resolved by installing more packages, such as libqt4-dev or other Qt-related packages.

In addition, / usr / bin / ld is not a directory; it is a linker program.

+4
source

All Articles