Re: Question for the experts...
I vaguely remember having a similar problem some time ago, I think the way
it worked properly on W7 was something along these lines (note the
keyword):
(fli:disconnect-module
"C:/Users/Yuri/Misc/Code/C++/AudioStream/Debug/AudioStream.dll" :remove t)
(fli:register-module
"C:/Users/Yuri/Misc/Code/C++/AudioStream/Debug/AudioStream.dll")
However, if the problem lies within the OS cache that might not help.
Also, as far as I can remember, in order to overwrite a library it had to
be disconnected first, unfortunately I do not have things set up in order
to verify it now.
On Sat, 01 Aug 2015 20:44:10 +0100, David McClain
<dbm@refined-audiometrics.com> wrote:
>
> During the creation of a C dynamic library for running time critical
> routines, called from Lisp. I found that whenever I made modifications
> to the library through the C compiler, I could not coax Lisp to drop
> what it thinks it knows about the library, and reconnect to the new
> version.
>
> This work was on Mac OS X so, being Unix-like, there was no problem
> (unlike a Windows environment) overwriting the active library image from
> the compiler while it was in use. The active previous image was already
> in memory and hooked to the running Lisp session, and while its inode
> may have been orphaned by the overwrite, that’s okay.
>
> I always had the following code for connecting to the library:
>
> (fli:disconnect-module :hsiirlib)
> (fli:register-module :hsiirlib
> :real-name
> (translate-logical-pathname
> #+:MAC "PROJECTS:DYLIB;libHsIIR.dylib"
> #+:WIN32 "PROJECTS:DYLIB;libHsIIR.dll"))
>
> What I tried doing whenever a fresh image of the library had been
> produced, was to re-execute that DISCONNECT-MODULE and REGISTER-MODULE.
> Looking at FLI::*CURRENT-MODULES-LIST* with the inspector, or with
> FLI:PRINT-FOREIGN-MODULES, always showed that the result of this
> re-execution cleared out the cached entry points established from prior
> executions of library routines from FLI code.
>
> But regardless of this cleared cache state, it seems that the system
> dynloader always opted for what it already had seen before, presumably
> still in memory cache somewhere. The library in question had only one
> user — the Lisp code. It was a special purpose library, not used by
> anything else in the running system.
>
> The only way I could see an indication of Lisp running new library code
> was to fully quit the Lisp session and begin anew.
>
> Has anyone else figured out how to keep an interactive session alive and
> also invoking fresh images of dynamic libraries?
>
> - DM
>
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> lisp-hug@lispworks.com
> http://www.lispworks.com/support/lisp-hug.html
>
--
Regards,
Yuri
http://www.disclosure.ie
_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html