Hi,
I wrote a program(glut01.sml) that uses GLUT library through Poly/ML's CInterface infrastructure on Mac OS X. But it doesn't work. It aborts with an IOException after "glutDisplayFunc". An execution log(glut-exec.log) and an error message (glut-error.log) are attached.
I thought there are some problems around the callback function. So I wrote 2nd program(glut02.sml). As you see, I changed the "glutDisplayFunc" to accept a function that returns "LONG" (which is wrong by the definition of the original function) instead of "VOID". And it works fine(does not abort).
Also, I wrote some test code(prog01.c, prog01.sml) those have the same problem as glut01.sml. And a wrong "fixed" version(prog02.c, prog02.sml) that works as I intent.
What is the right way to write a callback function that returns (void) without writing it as returning long value?
best regards,
Daisuke Homma