From: Martin P. <li...@ma...> - 2009-10-27 21:28:35
|
Sisyphus wrote: > Hi, > Does anyone here have comprehensive instructions for buidling > freeglut-2.6.0-rc1 (or even 2.4.0) with the MinGW port of gcc on Win32 ? <snip> Hi Rob, No comprehensive instructions that I'm aware of, but I can say that I've had success building both freeglut 2.4.0 and 2.6.0 RC1 with native MinGW (I have 2.4.0 binaries online at http://www.transmissionzero.co.uk/software/freeglut-devel/). I didn't use the configure script, rather I built my own Makefile. The static library is quite easy to build. Just define "FREEGLUT_STATIC" when compiling all of the object files, then do an "ar r libfreeglut_static.a [object files]" on the object files, and then "ranlib libfreeglut_static.a". The freeglut DLL is also quite easy to build. Just define "FREEGLUT_EXPORTS" when compiling all of the object files, and then a "gcc -o freeglut.dll [object files] -s -shared -lopengl32 -lgdi32 -lwinmm -Wl,--kill-at" (the "--kill-at" being to make it more binary compatible with Nate's GLUT for Win32 package, but slightly complicating the building of the import library). For the import library you need to create a module definition file containing the functions with their stdcall decorations, i.e. "glutAddMenuEntry@8". Then just run "dlltool -d [def file.def] -l libfreeglut.a --kill-at". I hope this helps. Let me know if you want a copy of the Makefile, def file, etc., and I'll send them over to you. Regards, Martin |