From: Reini U. <ru...@x-...> - 2004-09-20 21:46:43
|
How should def-call-out check its library? The postgresql module doesn't build for me, because it is nowhere defined which dll to load. http://clisp.cons.org/impnotes/dffi.html The current docs say only (:library "lispdll.dll") in one example, but are terrible silent about :library at the needed places. (:LIBRARY STRING) Specifies the (optional) dynamic library which contains the variable. So it looks like you have to explicitly define the prefix and extension. This is annoying and most better lisp force you to do so. They apply the "lib" prefix and ".so" extension on unix automatically, and on windows ".dll" without any prefix (LoadLibrary). cygwin should try "cyg" + library + ".dll", and then library + ".dll" with dlopen, if the first fails. => (def-call-out PQconnectStart (:library "pq") (:return-type PGconn) (:arguments (conninfo c-string))) A ffi:load-library doesn't seem to be considered. (because you might not want to keep the list of exported symbols in memory?) With ffi:load-library one could really make the library keyword optional. I assume the current default library is libc. windows? msvcrt.dll or kernel32? bindings/win32 calls various dll's, but at least they define the library. -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |