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:

2) Download and install MSYS 1.0.11.

My MinGW is in:

When MSYS prompted, I told MSYS that MinGW was in:

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:

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

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

No comments:

Post a Comment