View Full Version : collect2: ld returned 1 exit status
qtnewbie123
17th May 2009, 00:27
I have latest qt to a ubuntu system.I am taking this error collect2: ld returned 1 exit status
in build issues and this in compile output
/usr/bin/ld: cannot find -lfreetype
collect2: ld returned 1 exit status
make: *** [test] Error 1
make: Leaving directory `/home/joe/QtProjects/test'
Exited with code 2.
Error while building project test
When executing build step 'Make'
any help to fix that problem i can't run qt in linux....please help me
lyuts
17th May 2009, 10:01
What library paths did you specify?
... and is freetype (or freetype-dev) installed at all?
qtnewbie123
17th May 2009, 12:31
I have download this:
http://www.qtsoftware.com/downloads/sdk-linux-x11-32bit-cpp
and i installed it in ubuntu 9.04.I did just a simple install.At first i had a problem with g++ so i did
sudo apt-get install g++
Now i have this problem
collect2: ld returned 1 exit status
In an other box i have installed the windows version which compiling correct
What should i fix??
qtnewbie123
17th May 2009, 13:02
I fixed the problem:D
I had more errors like:
/usr/bin/ld: cannot find -lfreetype ---> libfreetype from synaptic package manager
/usr/bin/ld: cannot find -lSM ---> libsm
/usr/bin/ld: cannot find -lXext ----> libxext
The solution for the other newbies like me who have the same problems is to install from synaptic package manager the correct libs.
Lykurg
17th May 2009, 13:06
sudo apt-get install build-essential
is always a good start...
rickrvo
12th July 2011, 11:19
What if the error is cannot find -lssl and ssl package is installed? and on /usr/lib there is a libssl.a ; libssl.so ; libssl.so.0.9.8 and libssl3.so
The .so files only libssl3.so doesn't have the shortcut arrow on the icon.
same thing happened to -ljpeg... and I have libjpeg installed too.
What could be wrong?
stampede
12th July 2011, 12:24
Development libraries / packages are often marked as libwhatever-dev, so maybe try to install libjpeg-dev, or something like that.
rickrvo
12th July 2011, 15:06
Development libraries / packages are often marked as libwhatever-dev, so maybe try to install libjpeg-dev, or something like that.
It is already installed... every libjpeg or libssl related package is installed... except for libjpeg62-dev as libjpeg8-dev is installed... but I also tried with 62 and still same error...
stampede
12th July 2011, 18:51
Can you post the compilation command ? Make sure that you specify correct path for the linker with -L"path to lib" switch
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.