Follow us on Twitter!
Your life is ending one minute at a time. If you were to die tomorrow, what would you do today?
Friday, April 25, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 21
Guests Online: 18
Members Online: 3

Registered Members: 82909
Newest Member: awais
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Author

linker error with QT/QT Creator Debian linux


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 05-08-09 18:41
I installed QT (the latest stable version, I believe it's 4.5.2 or something like that) with qt creator, and everytime I try to build a project, I get:
collect2: ld returned 1 exit status
according to the compiler info, -lgobject-2.0 can't be found.
can anyone help me out?
the compiler output is as follows:

Running build steps for project AddressBook...
Starting: /opt/qtsdk-2009.03/qt/bin/qmake /home/zkunxen/AddressBook/AddressBook.pro -spec linux-g++ -r CONFIG+=debug
Exited with code 0.
Starting: /usr/bin/make -w
make: Entering directory `/home/zkunxen/AddressBook'
g++ -Wl,-rpath,/opt/qtsdk-2009.03/qt/lib -o AddressBook main.o addressbook.o moc_addressbook.o -L/opt/qtsdk-2009.03/qt/lib -lQtGui -L/opt/qtsdk-2009.03/qt/lib -L/usr/X11R6/lib -pthread -lfreetype -lgobject-2.0 -lSM -lICE -pthread -pthread -lXrender -lfontconfig -lXext -lX11 -lQtCore -lm -pthread -lgthread-2.0 -lrt -lglib-2.0 -ldl -lpthread
/usr/bin/ld: cannot find -lgobject-2.0
collect2: ld returned 1 exit status
make: Leaving directory `/home/zkunxen/AddressBook'
make: *** [AddressBook] Error 1
Exited with code 2.
Error while building project AddressBook
When executing build step 'Make'


I bolded the parts that show up in red in QtCreator.

I've tried googling it, but all the useful results are people asking the same/similar question with no answers.
Author

RE: linker error with QT/QT Creator Debian linux

p4plus2
Member

Your avatar

Posts: 167
Location:
Joined: 31.03.08
Rank:
Newbie
Posted on 05-08-09 22:36
Try to install these packages(they may be named slightly different for you)

libglib2.0-dev
libsm-dev
libxrender-dev
libfontconfig-dev
libxext-dev
libxext6-dbg
x11proto-xext-dev
libfreetype6-dev

Installing those should fix your problem.

edit: Fixed a typo and added a few more packages which you may need at some point.


"You can't be something your not,
Be yourself by yourself
Stay away from me" ~Walk, Pantera

"Playing an acoustic guitar is like having sex with your clothes on" ~Dave Mustaine

Edited by p4plus2 on 05-08-09 22:51
p4plus2@hotmail.com
Author

RE: linker error with QT/QT Creator Debian linux


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 06-08-09 05:49
Thank you, that was exactly what I needed. I installed those, and re-ran the IDE, built, and it worked, no problems.
Author

RE: linker error with QT/QT Creator Debian linux

p4plus2
Member

Your avatar

Posts: 167
Location:
Joined: 31.03.08
Rank:
Newbie
Posted on 06-08-09 08:22
Zkunxen wrote:
Thank you, that was exactly what I needed. I installed those, and re-ran the IDE, built, and it worked, no problems.


No problem, let me know if you have any more issues.


"You can't be something your not,
Be yourself by yourself
Stay away from me" ~Walk, Pantera

"Playing an acoustic guitar is like having sex with your clothes on" ~Dave Mustaine
p4plus2@hotmail.com