kungxm 发表于 2014-7-16 11:24:15

LINK : fatal error LNK1104: 无法打开文件“freeglut.lib”

用CMake安装成64位VS2010工程文件后,然后用VS2010生成ALL_BUILD,成功了500多个,失败2个。信息如下:

Time Elapsed 00:00:47.23
------ 已启动生成: 项目: Examples osgviewerGLUT, 配置: Release x64 ------
Build started 7/11/2014 2:47:49 PM.
InitializeBuildStatus:
Creating "example_osgviewerGLUT.dir\Release\Examples osgviewerGLUT.unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
Building Custom Rule E:/dev/OSG/OpenSceneGraph/examples/osgviewerGLUT/CMakeLists.txt
CMake does not need to re-run because E:\dev\OSG\OpenSceneGraph\build\examples\osgviewerGLUT\CMakeFiles\generate.stamp is up-to-date.
ClCompile:
osgviewerGLUT.cpp
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x64.Targets(265,5): error MSB6006: "link.exe" exited with code 1104.
LINK : fatal error LNK1104: 无法打开文件“freeglut.lib”

生成失败。

Time Elapsed 00:00:12.56
------ 已启动生成: 项目: Examples osgviewerGLUT, 配置: Debug x64 ------
Build started 7/11/2014 2:48:03 PM.
InitializeBuildStatus:
Creating "example_osgviewerGLUT.dir\Debug\Examples osgviewerGLUT.unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
Building Custom Rule E:/dev/OSG/OpenSceneGraph/examples/osgviewerGLUT/CMakeLists.txt
CMake does not need to re-run because E:\dev\OSG\OpenSceneGraph\build\examples\osgviewerGLUT\CMakeFiles\generate.stamp is up-to-date.
ClCompile:
osgviewerGLUT.cpp
LINK : fatal error LNK1104: 无法打开文件“freeglut.lib”

生成失败。


求大神解答,急。。

the_mercury 发表于 2014-7-23 12:30:48

就是缺少了freeglut库嘛,你自己去网上下一个,再用CMake配置一下就OK了,不是什么大问题呀.

大个子-张志庭 发表于 2017-7-26 10:48:23

在学习中,同样碰到了这个问题

在编译osg64位程序的时候,碰到了一个例子程序 osgViewerGLUT中调用freeglut的情况,报错

Creating directory "E:\vss\OceanData\osg34-64\OpenSceneGraph-3.4.0\bulid\examples\osgviewerGLUT\Release".
LINK : fatal error LNK1104: cannot open file 'freeglut.lib'

看来需要去自己编译一下freeglut这个了
页: [1]
查看完整版本: LINK : fatal error LNK1104: 无法打开文件“freeglut.lib”