Page 1 of 1

Sbcl Dll Loading Error-Converting to Text

PostPosted: Fri Aug 07, 2009 4:05 pm
by Harnon
I have an error while loading a foreign dll in sbcl:
Unable to load foreign library (CLUTTER).
Error opening shared object "C:\\Program Files\\Eclipse\\eclipse\\plugins\\jasko.tim.lisp.libs_1.1.1\\dlls\\libclutter-1.0.dll":
126.
I'm pretty sure i know what this error means, basically that it can't find another dll that it requires. However, is there anyway to convert this error to a textual representation,
say "Dll cant open this dll" or something more descriptive
Thxs!

Re: Sbcl Dll Loading Error-Converting to Text

PostPosted: Sat Aug 08, 2009 12:57 am
by skypher
Look here: http://msdn.microsoft.com/en-us/library ... nd%29.aspx

The "Examples" section should be esp. helpful.

Re: Sbcl Dll Loading Error-Converting to Text

PostPosted: Sat Aug 08, 2009 9:28 am
by Harnon
Is there any way to get a more specific error, though? For example, i attempted to load the library in allegro and it gave me the error message
"This application has failed to start because libglib-2.0-0.dll was not found. Re-installing the application may fix this problem."

Re: Sbcl Dll Loading Error-Converting to Text

PostPosted: Sat Aug 08, 2009 9:43 am
by Harnon
A question, has anyone had experience with the following problem on windows?
You try to load a dll, say libclutter, and you receive an error message that this dll depends on another. Then you try to load that new dll, and it has a new dependency.
Thus, you have to go through all the dependencies and make a list with the dlls in the correct order, sort of like this:
(defmacro load-libraries (&rest args)
`(progn
,@(loop for arg in args collecting `(cffi:load-foreign-library ,arg))))
(load-libraries
"libgmodule-2.0-0.dll"
"libglib-2.0-0.dll"
"libgobject-2.0-0.dll"
"libpng12-0.dll" "libcairo-2.dll"
"libpng12-0.dll"
"libgio-2.0-0.dll" "libgdk_pixbuf-2.0-0.dll"
"libintl.dll"
"libpango-1.0-0.dll"
"libpangowin32-1.0-0.dll" "libpangocairo-1.0-0.dll"
"libclutter-1.0.dll"
)

EDIT: Apparently, all i had to do was set the environment path. So, i guess all i need to do is learn to set the path in lisp. I would still like to know if it is possible to
display a more detailed error message instead of a general "dll missing". Like a specific name of a dll.

Re: Sbcl Dll Loading Error-Converting to Text

PostPosted: Mon Aug 10, 2009 5:32 pm
by Balooga
Harnon wrote:A question, has anyone had experience with the following problem on windows?
You try to load a dll, say libclutter, and you receive an error message that this dll depends on another. Then you try to load that new dll, and it has a new dependency.
Thus, you have to go through all the dependencies and make a list with the dlls in the correct order.


I had to do this with my OpenRM bindings.

- Luke