This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Guile tutorial available



craig> Since the issue of "what do I link against" pops up constantly,
craig> despite there being a documented policy for this, and reams of closed
craig> out falsely reported bugs in the Deban Bug database about libguile not
craig> linking with libqthreads, I'll write up what I put in all the bug
craig> reports.

great!  thanks for this write-up.

craig> The proper way to do this is to use guile-config.  So for tortoise2.c
craig> wen you compile and link in the same step try this:

craig> gcc `guile-config compile` -L/usr/X11R6/lib -lX11 \
craig>     `guile-config link` tortoise2.c -o tortoise2

i see.  

as a minor side note:

the thing that i had trouble w/ was for tortoise1.c.  i wasn't telling
the compiler the correct location of a library for sin and cos.  so
after trying -lc, i tried -lm.  yes, you can tell that i'm not a c hacker
by any definition :-)

(btw, i did use guile-config compile|link manually, having been pointed at
them in the tutorial)

for the purposes of the tutorial, although the compilation result is (?)
the same, don't you think that although redundant:

  gcc `guile-config compile` -L/usr/X11R6/lib -lX11 -lm \
      `guile-config link` tortoise2.c -o tortoise2

is a little clearer than:

  gcc `guile-config compile` -L/usr/X11R6/lib -lX11 \
      `guile-config link` tortoise2.c -o tortoise2

since:

  gcc -L/usr/X11R6/lib -lX11 -lm tortoise1.c -o tortoise1

works, and:

  gcc -L/usr/X11R6/lib -lX11 tortoise1.c -o tortoise1

doesn't?  (at least it didn't work for me)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]