[Ecls-list] load-foreign-library
Rick Taube
taube at uiuc.edu
Tue Oct 24 15:22:13 UTC 2006
On Oct 24, 2006, at 8:55 AM, Juan Jose Garcia-Ripoll wrote:
> I have found myself that when loading symbols with dlopen() the
> initial underscore is prepended automatically by OS X. Could this be
> the problem?
yes this is the problem. if i make cffi::convert-external-name a no-op:
(defun convert-external-name (name)
"Add an underscore to NAME if necessary for the ABI."
; #+:darwin (concatenate 'string "_" name)
; #-:darwin name
name)
then lib loading seems to be working IF my ffi is complied and loaded.
however if my ffi is loaded from its .fas files without compiling
then i still get an error:
;;; Loading "/Lisp/portmidi/cffi-portmidi.fas"
Unknown CFFI type: PORTMIDI::PM-TIMESTAMP.
Broken at CALL-NEXT-METHOD.
CM>>
---
(cffi:define-foreign-type pm-message () ':long)
(cffi:define-foreign-type pm-timestamp () ':long)
(cffi:defcstruct pm-event
(message pm-message)
(timestamp pm-timestamp))
it seems this only gets defined if the complier processes the file
More information about the ecl-devel
mailing list