位置: 编程技术 - 正文

在MSVC2012中使用freeglut代替glut(msvc命令行)

编辑:rootadmin

推荐整理分享在MSVC2012中使用freeglut代替glut(msvc命令行),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:msvc命令行,msvc命令行,msvc命令行,msvcprt,msvcrtdll,msvcprt,msvc命令行,msvcrtdll,内容如对您有帮助,希望把文章链接给更多的朋友!

使用MSVC时,需要手动配置glut.h,glut.dll和glut.lib文件。

这个帖子介绍说glut已经老掉牙了。点击打开链接

“GLUT is very dated now and not actively supported - so you should certainly be using Freeglut instead. You won't have to change your code at all, and a few additional features become available.”

You'll find pre-packaged sets of files from here: version: 版本提供了freeglut.dll, freeglut.lib,freeglut.h,glut.h等文件,并有位和位版本。与原生glut代码完美兼容。

附录:

for Windows

GLUT comes in two flavours for Windows. There's an old and unmaintained version called GLUT and an open source alternative called freeglut. The textbook examples rely on freeglut, so I suggest you install that one. You may find code that relies on GLUT that doesn't work with freeglut. The two libraries can coexist on one PC. Follow the Optional installation instructions to install it.

Installing freeglutGet the freeglut 2.8.1 MSVC zip file from the files to your PC.There are three types of files of importance: lib (in the lib folder), header (in the includeGL folder), and dll (in the bin folder).If you are using -bit Windows with Visual Studio , the following are the easiest places to put each of these files:lib files: C:Program FilesMicrosoft Visual Studio .0VClibHeader files: C:Program FilesMicrosoft Visual Studio .0VCincludegldll files: C:WINDOWSSystemIf you are using -bit Windows 7 or Windows 8 with Visual Studio do the following:Header files: C:Program Files (x)Microsoft Visual Studio .0VCincludegl-bit lib files: C:Program Files (x)Microsoft Visual Studio .0VClib-bit dll files: C:WINDOWSSysWOW-bit lib files: C:Program Files (x)Microsoft Visual Studio .0VClibamd-bit dll files: C:WINDOWSSystemInstall GLEW//不需要考虑这一段The textbook samples rely on GLEW to get extra OpenGL functionality. You should install it now.Download GLEW (-bit and -bit versions are separated): the headers, glew.lib and glew.dll files and install them to the same locations you used for freeglut.Set up a freeglut programStart Visual Studio Select File->New->ProjectA "New Project" Dialogue box will appear.Click the Visual C&#;&#; Projects Folder and select the Win Console Application template.Choose a "Name:" and a "Location:".Uncheck "Create directory for solution"Click "OK"In the Win Application Wizard, Select Application Settings, check the Empty project box, then click Finish.A new project has now been created. Now, we will add the main program...Adding new files:From the main menu, select Project->Add New Item... An "Add New Item" Dialogue box will appear.Select C&#;&#; File(.cpp) and call this file main.cpp.In the editor window, type your program or copy and paste in the code.Inserting existing files:Download the desired filesPut them in the project folder next to the file with the .vcproj extension.Add the files to your project: from the Visual Studio menu, select Project->Add Existing Item...A dialog will appear that should list the files you put in the project folder. Select them and add them.For example:Download Angel.zip and add all the files inside to your project.All of Dr. Angel's code relies on a set of utility files that he wrote. I have collected the files in a .zip file for your convenience.Add your OpenGL code and shaders. For example, download these sample files from the textbook add them to your project:example1.cppvshader.glslfshader.glslBuild and Run:You should be ready to go, but you may need to specify some libraries explicitly:Make sure the project is selected in the Solution Explorer, not a code file, and not the Solution.Go to Project->Propertiesexpand Configuration Propertiesexpand the Linker folderselect Inputadd these additional dependencies: opengl.lib;glu.lib;freeglut.lib;glew.lib-bit configuration - -bit Windows only-bit Windows will compile and run a -bit project, but if you want to try to do -bit OpenGL projects, you only have to do a little extra work:Go to Project->PropertiesClick on Configuration PropertiesClick Configuration ManagerSelect New... from Active solution platform:Select the new platform x, and copy settings from WinOpenGL 无法打开文件“freeglut_static.lib”的解决方法

评论:这个帖子的方法作用有限。参考:If you need freeglut_static.lib use the Debug_Static or Release_Static configurations in freeglut.sln.

无法打开文件“freeglut_static.lib” 的错误,这已经是自己第二次在这问题上纠结了,为了避免以后再遇到这问题时解决不了,还是把解决方法写上来_(:3」∠)_

在MSVC2012中使用freeglut代替glut(msvc命令行)

首先到freeglut的官方网站 2.8.0,将下载后的压缩包解压开,运行项目。由于我使用的是Visual Studio ,所以就进入..freeglut-2.8.0VisualStudio的文件夹下运行freeglut.sln打开项目。

在解决方案配置中选择release

然后单击运行。

运行完后弹出错误

无视之。

到..freeglut-2.8.0libx 发下多出了三个文件

将freeglut.dll移动到C:WindowsSystem 文件夹下

freeglut.lib移动到C:Program Files (x)Microsoft SDKsWindowsv7.0ALib 文件夹下

重新运行遇到无法打开文件“freeglut_static.lib”问题的程序,成功运行,问题解决~

glut:点击打开链接

Setting Up: OpenGL &#; GLUT &#; Windows &#; Visual Studio

我的第二个opengl程序 今天做了第二个opengl程序,其实是照抄书上的列子,然后加深理解,代码反正是书上的,这个就不解释了,主要是理解了画曲线需要定义A*XB,A为需要显

OpenGL cube map方式实现的环境贴图●如何设置相机 对cubemap有一些了解的朋友都知道,如果要在物体表面实现镜面反射的效果,需要在物体的中心设置一个相机,沿X,-X,Y,-Y,Z,-Z六个方向分别取景,

CodeBlocks下的freeglut环境配置(一)(附图文) 记得我以前调配环境的时候,查阅各种博客,各种英文官方文档,未能得其要义,真可谓目断长途也,一望一回远,而今蓦然回首,才知道是如此的简

标签: msvc命令行

本文链接地址:https://www.jiuchutong.com/biancheng/369660.html 转载请保留说明!

上一篇:Windows下的OpenGL编程进行简单介绍(Windows下的写字板功能是)

下一篇:我的第二个opengl程序(我的第二个姐姐用英语怎么说)

  • 增值税加计抵减政策
  • 固定资产一次性折旧的账务处理和税务处理
  • 公司账户转账给个人怎么合理避税?
  • 个税如何变更公司
  • 企业所得税税率
  • 继续教育专项扣除金额
  • 产品样品送样流程
  • 辞退员工补偿的月平均工资如何计算
  • 资产证券化会计准则
  • 应交税费减免税款
  • 收到供应商赔偿的违约金
  • 增值税起征点有啥用
  • 滞留票是什么意思
  • 营改增典型案例
  • 货物运输企业纳税多少
  • 税务稽查执法要以什么为依据,按照法定的职责
  • 收取技术服务费
  • 缴纳社保需要什么东西
  • 职工福利费和教育费的计提比例
  • 公司账上的资金与注册资金不一致可以吗?
  • 速动资产不包括存货和预付账款
  • 增值税普通发票和专用发票有什么区别
  • 建设银行对公转账限额
  • 发票查询发票代码有误
  • 电梯维保公司缴税标准
  • linux 使用u盘
  • 工商年报网上申报时间2023年
  • 应交增值税缴纳后入什么费用
  • 在win7系统中文件属性有哪些
  • 年度所得税报表在哪里查到
  • 支付挂靠方的管理费用有进项吗?
  • 夏威夷火山国家公园
  • 属于工业企业期间费用的是
  • 建筑工程企业管理费包括哪些内容
  • 生产型企业出口退税退的是哪部分的税
  • consul框架
  • php怎么写网页
  • GPT-4:关于下一代人工智能模型的事实、谣言和期望
  • 商誉 减值
  • 销售时的赠品怎么做账
  • java8 (jdk 1.8) 新特性——Lambda
  • 怎么开电子专用增值税发票
  • html 基础
  • mysql零基础入门教程完整
  • virtono搭建教程
  • sqlserver时间戳数据更新时也修改默认时间
  • sql server怎么升级版本
  • 专用红字发票如何开具
  • 民办非盈利组织注销了在哪登报
  • 会计销售返利处理流程
  • 合同约定合同期限自动顺延
  • 公账上的钱怎么提出来
  • 房产契税一般什么时间交
  • 税费的审计
  • 发放工资时社保为什么计入其他应付款科目
  • 借用别人公司
  • 财政授权支付的概念
  • 资产负债表里包括应付利息吗
  • 年底汇算清缴是什么
  • 软件测试取费标准
  • 普票抵扣
  • mysql数据库5.7.27安装
  • mysql数据库性能
  • sql2005 存储过程 某个字段小于某个值时变颜色
  • windows vista
  • windows累积更新
  • win10预览版和正式版
  • Linux系统下以模块方式安装卸载文件系统
  • redhat下载教程
  • 用git打更新包的代码
  • cocos creator rpg
  • js开发android应用
  • Python内置函数的应用操作
  • python引用方法
  • unity shader ao
  • nodejs.
  • js中的tostring方法
  • python3 heapq
  • 印花税怎么计提科目
  • 构建税务系统纵向到底
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设