Re: How CLSQL finds and loads foreign libraries
"Hoehle, Joerg-Cyril" <[email protected]>
| Newsgroups | gmane.lisp.clsql.devel |
|---|---|
| Message-ID | <5F9130612D07074EB0A0CE7E69FD7A03047B30E9@S4DE8PSAAGS.blf.telekom.de> |
Hi, Edi Weitz wrote: >So, my proposal is to change UFFI:LOAD-FOREIGN-LIBRARY to accept >strings like "libpq.so" and "libpq.dll" which will be handed over >unmodified to the corresponding implementation-defined >functions/macros. What do you propose to do with all that UFFI-using code ou there which uses uffi:find-foreign-library? >If you agree that this is a good idea I'll try to provide patches for >UFFI (including docs) and CLSQL. Such a change should work well with CLISP, as dlopen() on UNIX (or is it rather ld.so on Linux??) and LoadLibrary() under MS-Windows/native will try to find the lib themselves. I don't know about other systems like HP-UX though. And there's a note in CLISP/spvw.d:libopen() about Darwin saying that it needs to search the library in /usr/lib/. So are you sure this is very portable? And it doesn't free from the problem of finding the correct set of #+xyz to extract the needed suffix (.dll (even on #+unix but #-cygwin), .so, and I've seen .dylib somewhere). Regards, Jorg Hohle.