[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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



Sthu Deus wrote the following on 28.02.2011 07:12

Hello

> Good day.
> 
> 
> I try to compile a program w/ the help of qmake and make and on make
> running stage I get:
> 
> $ make
> g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB
> -DQT_CORE_LIB -I/usr/share/qt4/mkspecs/linux-g++ -I.
> -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4
> -I. -I. -o 1.o 1.cpp g++ -Wl,-O1 -o atry 1.o    -L/usr/lib -lQtGui
> -lQtCore -lpthread
> /usr/bin/ld: cannot find -lQtGui
> collect2: ld returned 1 exit status make: *** [atry] Error 1
> 
> Googling have shouwn me that I can try replacing a lib and then it will
> magically be compiled, another approach is to install
> 
> freetype1-dev libgtk2.0-dev
> 
> but I have the first already installed and the second brings a lot of
> dependencies, and, because I use KDE environment I do not have a so
> many GTK packages - rather I would decline using of qmake/make and will
> continue using g++ directly.
> 
> So, may You know a better solution for my problem?
> 
> 
> Thank You for Your time.

$ apt-file search /usr/include/qt4/QtGui | grep '/usr/include/qt4/QtGui/QtGui'
libqt4-dev: /usr/include/qt4/QtGui/QtGui

So i think you need to
$ apt-get install libqt4-dev

-- 
bye Thilo

4096R/0xC70B1A8F
721B 1BA0 095C 1ABA 3FC6  7C18 89A4 A2A0 C70B 1A8F



Reply to: