How to build or install freeglut on a windows machine

♀尐吖头ヾ 提交于 2019-12-10 10:44:03

问题


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

回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/11298963/how-to-build-or-install-freeglut-on-a-windows-machine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!