GTK Gui Module Help

Archives Forums/Linux Discussion/GTK Gui Module Help

William Drescher(Posted 2009) [#1]
I'm trying to build an application using Brucey's GTK Gui module and it says:

/usr/bin/ld: cannot find -lglib-2.0
collect2: ld returned 1 exit status
Build Error: Failed to link myapp


Being a complete Linux newbie (at least for now) I have no idea what that means. Please help me.


plash(Posted 2009) [#2]
Do you have GTK 2.0 installed?


Mark Tiffany(Posted 2009) [#3]
when you see this:
/usr/bin/ld: cannot find -lglib-2.

It means that the linker (ld) could not a the library named after the -l, i.e. glib-2. As Plash suggests, this is probably part of gtk dev module, so make sure you get it. Otherwise, search the interweb for that lib (and the next one that fails) and install the relevant modules.


skidracer(Posted 2009) [#4]
from the original gtk thread:

sudo apt-get install libgtk2.0-dev


JoshK(Posted 2013) [#5]
From four years in the future: Thanks! :)