[Ecls-list] load-foreign-library
Rick Taube
taube at uiuc.edu
Sat Oct 21 19:35:11 UTC 2006
> Is the FFI:LOAD-FOREIGN-LIBRARY a toplevel statement??? If so, then
> you should see that the library gets added to the arguments of GCC
> when you compile that file. If this does not happen, something strange
> is going on.
its a "top-level" statement inside the file that is being compiled
and loaded. the external lib (/usr/local/lib/libportmidi.dylib) does
appear in the second gcc step when i compile the lisp file:
;;; Calling the C compiler...
;;; Note: Invoking external command:
;;; gcc -g -O2 -fPIC -fno-common -fstrict-aliasing -Ddarwin -O "-I/
usr/local/lib/ecl/" -w -c "/Lisp/portmidi/cffi-portmidi.c" -o "/Lisp/
portmidi/cffi-portmidi.o"
;;; Note: Invoking external command:
;;; gcc -o "/Lisp/portmidi/cffi-portmidi.fas" -L"/usr/local/lib/ecl/"
"/Lisp/portmidi/cffi-portmidi.o" -bundle -lecl -lm -lgmp /
usr/local/lib/libportmidi.dylib
;;; Finished compiling /Lisp/portmidi/cffi-portmidi.lisp.
;;; Loading "/Lisp/portmidi/cffi-portmidi.fas"
#<ASDF:SYSTEM "portmidi" 22335376>
however the entry points dont appear to be defined after the file is
loaded. this is my cffi definition:
(cffi:defcfun ("Pm_Initialize" pm-initialize) pm-error)
and when i call my function
CM> (pm:pm-initialize)
FIND-FOREIGN-SYMBOL: Could not load foreign symbol "_Pm_Initialize"
from module :DEFAULT (Error: NIL)
More information about the ecl-devel
mailing list