From: bpj AT po DOT cwru DOT edu (Bart Jaszcz) Subject: glut32.dll -> libglut32.a 21 Dec 1998 21:46:48 -0800 Message-ID: <19981221233255.29198.qmail.cygnus.gnu-win32@findmail.com> To: gnu-win32 AT cygnus DOT com 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 AT cygnus DOT com" with one line of text: "help".