Re: how to tell compiler to look for GTK library



On Sun, 24 Aug 2003 21:16:36 PDT, Jeff Trefftzs <trefftzs tcsn net>  said:
> On Sun, 2003-08-24 at 20:49, stan huang wrote:
> >  GTK1.2 is installed and it's in the right place:
> > /usr/include/gtk1.2, but when I tried to compile it,
> > gcc couldn't find such file or directory, then I tried
> > to hash include the entire directory the gcc still
> > couldn't find the file, do I
> > still need to do something to make sure gcc knows
> > where the library is?
> 
> A quick check on my system (RH9) shows the directory as
> 
> /usr/include/gtk-1.2  (note the dash between gtk and 1.2).
> 
> Check man ldconfig to see if /usr/include is in our load path (I don't
> see how it couldn't, but ...), and maybe add /usr/include/gtk-1.2 to the
> /etc/ld.so.conf file as well.  Or, try addint /usr/include/gtk-1.2 to
> your LD_LIBRARY_PATH environment variable.

/usr/include doesn't have anything to do with ldconfig.  

Getting a -I/usr/include/gtk-1.2 into gcc would be more productive,
either by modifying the CFLAGS or CPPFLAGS environment variables:

export CPPFLAGS=`gtk-config --cflags`      (note those *back*ticks)

(or similar magic inside a Makefile).

Attachment: pgpC4sni2cRcC.pgp
Description: PGP signature



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