This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

glut32.dll -> libglut32.a


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".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]