Friday 26 November 2010

How to Build freeglut on Windows XP with MinGW


1) Download and extract freeglut 2.6.0.

I placed freeglut in:
C:\binh\tools\freeglut-2.6.0


2) Download and install MSYS 1.0.11.

My MinGW is in:
C:\binh\tools\Qt\2010.02.1\mingw

When MSYS prompted, I told MSYS that MinGW was in:
C:/binh/tools/Qt/2010.02.1/mingw


3) Open MSYS and go to your freeglut directory.

To change directories:
$ cd /"drive letter"
For example, to change to d drive:
$ cd /d

Mine was:
c/binh/tools/freeglut-2.6.0


4) Configure, build, and install.

--prefix=/mingw means that you want 'make' to copy the header files and libraries into MinGW for you.

$ ./configure --prefix=/mingw
$ make
$ make install


Notes
  • I tried using freeglut with Bullet Physics but the link step failed. 
  • Bullet Physics looked for glut32 but mine was called glut.lib. 
  • I renamed glut.lib to glut32.lib but the link step failed again. 
  • freeglut was trying to use a functions such as timeEndPeriod(), timeBeginPeriod(), joyGetPosEx(), and joyGetDevCapsA() which are part of winmm.lib
  • I tried using GLUT that came with Bullet Physics and that worked.
References

No comments:

Post a Comment