[Ecls-list] calling ECL functions defined in an ASDF package from C code
Matthew Mondor
mm_lists at pulsar-zone.net
Mon Jul 11 19:40:22 UTC 2011
On Sun, 26 Jun 2011 13:49:58 -0700
Eric Schulte <schulte.eric at gmail.com> wrote:
> Beautiful, this is now working on my system. The only change I needed
> to make was setting LD_LIBRARY_PATH so that libfoo.so could be found at
> runtime, with the following
>
> (ext:system "export LD_LIBRARY_PATH=/home/eschulte/Desktop/lisp-lib; ./main.exe")
Alternatively to using LD_LIBRARY_PATH it's also possible to use ELF
RPATH to hold the library paths. For instance, adding the following to
the compiling command using GCC would
add /home/eschulte/Desktop/lisp-lib:
-Wl,-R/home/eschulte/Desktop/lisp-lib
objdump -p from binutils should show the RPATH entries for an ELF object
ldd depending on your OS, should display the library dependencies and
the fullpath found to them
Your custom RPATH directives can be added to C:*USER-LD-FLAGS*, which
ECL will use when generating the compiler commands.
--
Matt
More information about the ecl-devel
mailing list