[Ecls-list] UFFI:LOAD-FOREIGN-LIBRARY

Goffioul Michael goffioul at imec.be
Tue Nov 15 00:19:01 UTC 2005


> > ...
> > Please complain if it does not work as expected :-)
> > 
> > Juanjo
> 
> Sorry, but it does not... =<8-(
> 
> The problem is that it does not check wether the file exists or not...
> 
> 
> (defun do-load-foreign-library (tmp)
>   (let* ((filename (namestring (compile-file-pathname tmp 
> :type :lib)))
> ----------------------------------------------------------------^^^^
>   ...
> 
> On my system (linux/intel), 
> 
> (compile-file-pathname #P"/usr/lib/libSDL.so" :type :lib)
> 
> does return:
> 
> #P"/usr/lib/liblibSDL.a"
> 
> and this is NOT what I expected. (Does it have any sense ?)

Yes, it does... at least in the Windows context. I introduced this. Actually,
the whole load-foreign-library function in ECL is just a hack the modify
the ECL compiler such that the compiled file is linked with the library.
With MSVC, you don't link against .dll files, but against .lib. Of course
it's far from perfect and the behavior could probably be tuned with a #+msvc.

Michael.




More information about the ecl-devel mailing list