Sbcl Dll Loading Error-Converting to Text

Discussion of Common Lisp
Post Reply
Harnon
Posts: 78
Joined: Wed Jul 30, 2008 9:59 am

Sbcl Dll Loading Error-Converting to Text

Post by Harnon » Fri Aug 07, 2009 4:05 pm

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!

skypher
Posts: 34
Joined: Thu Jul 03, 2008 6:12 am

Re: Sbcl Dll Loading Error-Converting to Text

Post by skypher » Sat Aug 08, 2009 12:57 am

Look here: http://msdn.microsoft.com/en-us/library ... nd%29.aspx

The "Examples" section should be esp. helpful.

Harnon
Posts: 78
Joined: Wed Jul 30, 2008 9:59 am

Re: Sbcl Dll Loading Error-Converting to Text

Post by Harnon » Sat Aug 08, 2009 9:28 am

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."

Harnon
Posts: 78
Joined: Wed Jul 30, 2008 9:59 am

Re: Sbcl Dll Loading Error-Converting to Text

Post by Harnon » Sat Aug 08, 2009 9:43 am

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.

Balooga
Posts: 14
Joined: Tue Jul 15, 2008 1:20 pm

Re: Sbcl Dll Loading Error-Converting to Text

Post by Balooga » Mon Aug 10, 2009 5:32 pm

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

Post Reply