guile-user
[Top][All Lists]
Advanced

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

Re: SWIG 1.3, guile 1.4, and compiled module loading


From: Brett Viren
Subject: Re: SWIG 1.3, guile 1.4, and compiled module loading
Date: Tue, 19 Mar 2002 09:12:57 -0500

Thien-Thi Nguyen writes:
 > how is this compilation done (e.g., w/ libtool)?

Just by hand:

gcc -fPIC -c mymod_wrap.c -o mymod_wrap.o
gcc -shared -o libmymod.so mymod_wrap.o -lmywrappedlib

 > guile 1.4 libguile embeds libltdl, which is responsible for abstracting
 > shared object library access and initialization.  libltdl is sensitive
 > to env var LTDL_LIBRARY_PATH.
 > 
 > i cannot remember if swig 1.3 uses libltdl (shame on me for slacking off
 > on swig, i know).  your system's ld.so might respond to LD_LIBRARY_PATH.

On:

http://www.math.uni-magdeburg.de/~mkoeppe/guile/swig-guile.html

it talks about using -Linkage ltdlmod but says this is deprecated.
This was what in fact what I used a long while ago in a previous
(failed do to lack of time) effort.  There is also "native guile
module linkage" but that requires guile 1.5.  This looks like it works
much easier, but I would like to stick with guile 1.4 for now (at lest
until Debian distributes 1.5), so "passive" linkage looked like the
best compromise. (BTW, kudos to you, Matthias and other SWIG Guile
hackers for so many choices!)

I just tried this method.  With it I must write my SWIG .i file a
little differently to explicitly add define-module and export, but in
the end the result are the same.  When I set LTDL_LIBRARY_PATH it
looks for the library in there, not in the mydir/.  If I use
(dynamic-link "mydir/libmymod.so") it also fails.

Do I need to use libtool for ltdlmod linkage?  If so, anything special
I should know, or should I just hit the info pages?

-Brett.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]