RE: [gtk-list] RE: cannot compile using gtk



On 28-Feb-99 trout2 wrote:
> 
> thanks for the reply:
> 
> it is very true that i don't know very much about gcc.

Then read my dear fellow ;)

> i ran "gtk-config --libs"
> it returned this string:
> -L/usr/local/lib -L/usr/X11R6/lib -lgtk -lgdk -lglib -lXext -lX11 -lm

OK, so it sets the directories for libraries to the ones specifies with -L
and the libraries to the libraries specified with -l to link with. Btw,
this will yield errors on in my compile attempts since I have to -lgmodule
as well.

> /usr/local/lib exists, as does /usr/X11R6/lib

Then it's awkward that it responded with the `directory doesn't exist'
error.

> i found all of the corresponding libraries (assuming that -lgtk
> corresponds to libgtk.a, libgtk.la, libgtk.so, libgtk.so.1.6) except for
> whatever corresponds to -lm (i could find no libm.a, etc).

If yer system is ELF and the linkage is specified to shared, then it will
use the .so libraries.

libm is the mathematical library, which includes functions like sin, cos,
etc. This _is_ needed for GTk+ for drawing.

> is this reasoning correct?

Yer learning =)

> i am assuming that gtk-config tells gcc where to look for libraries (in
> these dir)

Correct, as a sort of easy reference script for compilation flags. Who is
to say that my GTk+ libraries reside in /usr/local/lib?

---
Jeroen Ruigrok van der Werven     <http://www.freebsdzine.org> 
asmodai(at)wxs.nl        The idea does not replace the work...
Network/Security Specialist      <http://home.wxs.nl/~asmodai>
*BSD: Powered by Knowledge & Know-how <http://www.freebsd.org>



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