glut32.dll -> libglut32.a
Bart Jaszcz
bpj@po.cwru.edu
Mon Dec 21 16:10:00 GMT 1998
I finally managed to generate the import lib
for glut32.dll . I had some problems initially,
here's a quick list of problems and the solution:
I used PEXPORTS utility to generate the glut32.def
file.
$ pexports -h glut.h glut32.dll > glut32.def
PEXPORTS has some problems. It doesn't really
parse the header file properly... mainly it doesn't include any files named in the header
file, second, it misinterprets some types. For
glut, it incorrectly identified GLdouble as a
4 byte value. I preparsed glut.h by hand,
replacing GLdouble with double, but it still
didn't work. Finally, I made each function taking
a double take two integers instead to make the
stack size correct.
Then comes the dlltool:
$ dlltool --input-def glut32.def --dllname glut32.dll --output-lib libglut32.a --kill-at --add-stdcall-alias
notice the '--kill-at' and '--add-stdcall-alias' options. without them, your program will compile but the runtime linker will not be able to find the functions your calling in the actual dll.
It seems a lot of ppl are using cygwin to program opengl. This is why I post this message. Hope you're creating the next shooter game, I'll play it... :)
--bart
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
More information about the Cygwin
mailing list