Primarily technical blog on Lisp, .NET, C# development.

Friday, August 21, 2009

clbuild and lispbuilder-sdl

On my earlier version of the alarm clock I used the cl-sdl library. I was testing clbuild the other day and I tried to use its version of the sdl: lispbuilder-sdl. Unfortunately on my machine I was getting an error everytime the app was about to close the window due to a call to SDL-glue-SDL-Close-Audio method on the cffi part of the lispbuilder-sdl library:


I suppressed this message by calling a method I knew was working and it worked fine so far.

So if you want to try the same thing, look for the glue.lisp file on the clbuild/source
/lispbuilder-sdl/cffi and change this part to the following code:

#+lispbuilder-sdl-audio

(cffi:defcfun ("SDL_CloseAudio"
SDL-glue-SDL-Close-Audio) :void)

So instead of calling the original method I am using the SDL_CloseAudio and it is working fine so far.

5 comments:

Luke Crook said...

Since you are using Linux, and the glue library is currently supported only in Windows, I don't understand how :lisbuilder-sdl-audio could be pushed onto *features*.

Are you using the latest version of lispbuilder-sdl from svn on googlecode?

- Luke

Lukas Macedo said...

Thanks for your comment Luke. I googled this library at the time and I have no idea why is/was it getting included in the Linux compiled version. I will update my lispbuilder version and try again. I really don't like the lousy hack I did.

Thanks,

Lukas

hodgefamilysingapore said...

FYI, the same happens to me when using clbuild to install. I'll try the svn version and see if cures the problem.

Luke Crook said...

Please let the lispbuilder-sdl mailing list know if this is still a problem from svn.

http://www.lispniks.com/mailman/listinfo/application-builder

Or just post a comment on #lisp with sdl somewhere in the line, and I'll pick it up sometime during the day.

Lukas Macedo said...

I didn't have a chance to try it again. But I will leave a message at the mailing list if it is not fixed.