位置: 编程技术 - 正文

在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程序(我的第二个姐姐用英语怎么说)

  • 个体户超过了核定征收额怎么交税
  • 虚开增值税如何获利
  • 累进税率的形式有全额累进税率和什么两种
  • 税后营业利润和利润总额的区别
  • 出口报关单上面的运费怎么填
  • 林业一般纳税人的税率是多少?
  • 公司员工社保怎么办理的
  • 住宿发票要附清单吗
  • 转让土地缴纳增值税进项如何抵扣
  • 公司投资的股权财产怎么认定
  • 公司购入汽车分录
  • 购入无形资产产生的咨询费
  • 土地增值税清算比例的计算
  • 受托方提供材料怎么写
  • 单位公积金可以拖欠多长时间缴
  • 企业开普票和专票的税率一样吗
  • 建筑业外出经营管理办法
  • 固定资产停止使用还计提折旧吗
  • 小规模纳税人 核定
  • 高温津贴的发放
  • 报税的销售额怎么改数字
  • 出口企业进项税额转出怎么理解
  • 定率征收怎么申报
  • 生产成本中的电费计入制造费用吗
  • win10专业版虚拟内存怎么设置
  • 超市的成功秘诀
  • 电脑运行时cpu温度
  • 专柜公司货什么意思
  • bios详细解释及作用
  • 个税这个月多交了下个月减回来
  • 电脑开不了机一直重启
  • 非货币性资产交换的记忆口诀
  • 提取企业发展基金用到银行存款科目吗
  • 销售折扣增值税如何处理
  • 增值税纳税人的区别
  • php调用其他php函数
  • php判断字符串是否存在
  • t typescript
  • 微信手机充值怎么自定义金额
  • 基于深度学习的轴承寿命预测实践,开发CNN、融合LSTM/GRU/ATTENTION
  • 无需本地部署的软件
  • 当深度学习遇上Web开发:Spring和OpenAI如何实现图片生成?
  • 基于opencv的人脸检测算法
  • $ajax请求
  • filezilla使用手册
  • 差旅费住宿专票可以抵扣吗
  • 小规模纳税人利润超过300万
  • 卖固定资产计入
  • 3月1日前包括什么意思
  • mysql数据库uuid
  • php和mysql的联合使用解决了
  • 代扣代缴个人所得税手续费返还 增值税
  • etc发票写着不征税怎么办
  • 开了发票不做收入的账务处理是?
  • 小规模纳税人税额怎么算
  • 人力资源行业企业成长
  • 超市预付卡销售会计分录
  • 去年计提的费用今年取得发票 汇算清缴
  • 房地产开发企业分为几个等级
  • 所得税费用科目编码
  • 出口退税进项税额转出怎么申报
  • 小企业核算方式选独立核算
  • 汇算清缴可以调整主营业务成本吗
  • 计提人工成本会计分录
  • win8系统出现自动修复
  • winxp系统开机启动项
  • 从此学会隐藏悲伤全文
  • win8 开始
  • java如何自定义函数
  • 使用nodejs中httpProxy代理时候出现404异常的解决方法
  • jquery 滑块
  • [置顶]星陨计划
  • 注释标签的内容会显示在浏览器窗口中
  • jquery滚动条滚动到指定位置
  • 电子税务局财务报表利润表本期金额
  • 如何查询票据真伪信息
  • 买车可以抵扣企业所得税多少
  • 增值税按次纳税的规定
  • 下载国税网上申报
  • 税务干部工作纪实怎么写
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

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

    友情链接: 武汉网站建设