On Thu, Jun 4, 2009 at 10:59 AM, Gary Byers gb@clozure.com wrote:
I'm not sure if this is the only problem, but it seems that the most functions defined in the FreeGLUT library use the 'stdcall' calling convention
That shouldn't be a problem because CL-GLUT assumes a cdecl freeglut.dll and doesn't specify :cconv :stdcall for the callbacks it sets up. (And it works on other Lisps, hopefully not out of sheer luck.)
I'm pretty sure that FreeGLUT can be built using cdecl instead of stdcall and that I built one myself (http://common-lisp.net/~loliveira/tmp/freeglut.dll) but that was a while ago so I might be misremembering it.
It looks like CFFI is generally familiar with this cdecl/stdcall stuff and has the infrastructure in place to do the right thing, but the CCL backend just doesn't implement it.
Correct. I just pushed a patch that implements that. I couldn't test it because I don't have access to a Windows system at the moment so if anyone is interested, please load the test suite, after compiling libtest.c manually since cffi-tests.asd doesn't do that automatically on Windows, and run (rt:do-test 'cffi-tests::callbacks.stdcall.1).