P.Brian.Mackey
P.Brian.Mackey

Reputation: 44275

How to build or install freeglut on a windows machine

I downloaded freeglut. I'm reading the installation instructions. I extracted all the files. I see a file called configure (and configure.ac). I opened visual studio command prompt and changed the directory to

C:\DevStuff\OpenGL\freeglut-2.8.0

The next step is to configure the packages

./configure

This looks like a Linux command. How am I supposed to complete this kind of a build on a windows 7 machine? I have visual studio 2010 ultimate ed.

UPDATE

I found the VS2010 directory and successfully performed a build. I need freeglut_static.lib, which did not come out of this build. The output directory

..\..\lib\x86\Debug contains only one lib file, freeglut.lib.

I suspect I need the makefile, but I really don't know. This lib is required for OpenGL Superbible sample projects. In the sample projects when I try to run it a compilation error:

error LNK1181: cannot open input file 'freeglut_static.lib' C:\DevStuff\OpenGL\SB-WinwBin\SuperBible4\examples\projects\microsoft\chapt01\block\LINK    block

Upvotes: 4

Views: 26286

Answers (2)

P.Brian.Mackey
P.Brian.Mackey

Reputation: 44275

Info for anyone trying to get the samples for 4th ed OpenGL superbible to work on a Windows box.

The website comes with everything you need. No need to build or install freeglut seperately. It's just that the projects are not configured correctly. For visual studio 2010, here's the fix for the first project entitled block:

  1. Right click the project > properties > VC++ Directories > Library Directories (not Include directories) > Add a link to the freeglut_static.lib which comes with the download. E.G. C:\DevStuff\OpenGL\SB-WinwBin\SuperBible4\examples\src\shared;

  2. If you build now, you will get a new error regarding inability to link LIBC.lib. With the project properties still open go to Linker > Input > Ignore Specific Default Libraries > click the dropdown arrow > click <Edit...> > type LIBC.lib and click ok.

Now everything should build just fine.

Upvotes: 5

genpfault
genpfault

Reputation: 52084

How am I supposed to complete this kind of a build on a windows 7 machine?

MSYS.

Or use the VS2010 solution in the VisualStudio\2010 directory.

EDIT:

If you need freeglut_static.lib use the Debug_Static or Release_Static configurations in freeglut.sln.

Upvotes: 4

Related Questions