Lisp HUG Maillist Archive

Reloading foreign libraries

Hello,

I am currently working on a connection between LW and an external C library. LispWork FLI and/or CFFI work pretty well for that, but I don't seem to be able to dynamically "unload" and reload the library (for instance if I change and recompile the lib, and want to connect the new functions to LW, without having to restart all).

Actually, it seems that FLI::disconnect-module (even with :remove T) has no effect: the symbols are still resolved and the foreign funcalls still work.

Does anyone have any experience or suggestion ?
Thank you,

Jean Bresson


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Reloading foreign libraries

Unable to parse email body. Email id is 12582

Re: Reloading foreign libraries

On Tue, 05 Nov 2013 11:09:52 -0000, Jean Bresson <Jean.Bresson@ircam.fr>  
wrote:

> Actually, it seems that FLI::disconnect-module (even with :remove T) has  
> no effect: the symbols are still resolved and the foreign funcalls still  
> work.
>
> Does anyone have any experience or suggestion ?

I remember having a similar trouble, as far as I can recall, things were  
getting confused about passing the name and real-name arguments. In the  
end it worked if I supplied only the path to the library to both  
disconnect-module and register-module.

(setq path "c:/libs/lib.dll")

(fli:disconnect-module pathname :remove t)
(fli:register-module pathname)

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Reloading foreign libraries

Unable to parse email body. Email id is 12587

Updated at: 2020-12-10 08:34 UTC