Re: error compiling GTK program
- From: Tim Keck <timkeck@xxxxxxxxxxxxxx>
- Date: Tue, 28 Feb 2006 05:25:03 -0500
pratsadhu wrote:
Hi all
I get this particular error while compiling GTK programs:
i compile with:
-----------------------------------------------------
$ gcc base.c -o base `gtk-config --cflags --libs`
/usr/bin/ld: cannot find -lXi
collect2: ld returned 1 exit status
--------------------------------------------------------
gcc test.c -o test `gnome-config --cflags --libs --gnomeui`
:/usr/bin/ld: cannot find -lSM
collect2: ld returned 1 exit status
--------------------------------------------------------
Am using gtk 1.2.8.
Thankin u all,
prat
You haven't told the linker where to find the X libraries.
On my system,
locate libSM.a
returns:
/usr/X11R6/lib/libSM.a
so I would try something like:
gcc test.c -o test -L/usr/X11R6/lib `gnome-config --cflags --libs --gnomeui`
or write a makefile that includes the library path explicitly.
HTH,
Tim Keck
.
- Follow-Ups:
- Re: error compiling GTK program
- From: Micah Cowan
- Re: error compiling GTK program
- References:
- error compiling GTK program
- From: pratsadhu
- error compiling GTK program
- Prev by Date: error compiling GTK program
- Next by Date: libXft2
- Previous by thread: error compiling GTK program
- Next by thread: Re: error compiling GTK program
- Index(es):
Relevant Pages
|