[Ecls-list] Newbie question

daniel jay macdonald dmacd at u.washington.edu
Mon Dec 20 00:36:02 UTC 2004


> Yes, there is, but it's maybe not very well documented :-)
> In my case, I'm compiling some LISP code and linked it with
> MATLAB libraries. To do that, I overwrite the variables
> c::*cc-flags* and c::*ld-bundle-flags* like this:
>
> (let ((c::*cc-flags* (concatenate 'string c::*cc-flags*
>                                          " -ID:/Tools/Matlab/extern/include"))
>      (c::*ld-bundle-flags*
>        (concatenate 'string c::*ld-bundle-flags*
>                     " /LIBPATH:D:/Tools/Matlab/extern/lib/win32/microsoft/msvc60 libmx.lib libmex.lib")))
>  (compile-file "mexiface.lsp"))

Thanks! It would be nice if there was a doc wiki so things like this could 
be compiled in one place. Its a bit of a put off for new users to have to 
sift the archives in vain for common things like this (although I did 
eventually find some posts hinting at it in passing).

My next dumb question: how do I force ecl to reload a shared library? I 
want to recompile code and then call the new versions without restarting 
ecl. Based on glances at the gc code that unloads libraries I try this:

(defun nuke-package (name)
   (let ((pkg (find-package name)))
   (do-symbols (s pkg)
     ;(si::unlink-symbol s))
     (when (eq (symbol-package s) pkg)
       (fmakunbound s)
       (makunbound s)
       (unintern s) ))
   (delete-package pkg)
   (si::gc t)))


But it doesnt seem to be quite enough.

This seems like a natural thing to do, am I missing the simple answer?

Daniel




More information about the ecl-devel mailing list