glui

如何在OpenGL基础上配置好GLUI?

网上以及GLUI自带文档都是不详细且有问题的,特别是对于VS2005,以及VS2008的用户,通常会产生一些exit()重定义问题,以及enternal symbol的问题。在一夜研究之后,终于成功。

下面是Alfie对于VS2005以及VS2008用户最完美的解决方案:

1. Install opengl, and make sure it works out.

2. Download "glui-2.35.zip" (http://glui.sourceforge.net/#download)

3. In "glui-2.35/glui-2.35/src/include/GL",you get glui.h.
   creat file C:/Program Files/Microsoft Visual Studio 9.0/VC/include/GL, and put "glui.h" there.

4. in "glui-2.35/glui-2.35/src/msvc", click "glui.dsw" (load and open).

5. in the project Properties: -> C/C++ -> Preprocessor -> Preprocessor definitions and append GLUT_BUILDING_LIB to the existing definitions, seperated by semicolons.

6. in the project Properties: -> C/C++ -> Code Generation -> Runtime Library, and chang it to "Multi-threaded DLL(/MD)" or "Multi-threaded Debug DLL(/MDd)"(Latter one is Better).

7. run project "_glui library", then you get "glui32.lib" in a new "lib" file. Put glui32.lib in "C:/Program Files/Microsoft Visual Studio 9.0/VC/lib".

8. Now you can open an example of GLUI, and repeat step 5 and 6.
Then, Click the menu item "Project" --> "Properties...". Click "Linker" --> "Input" .
Type in Additional Dependencies: glui32.lib glut32.lib glu32.lib opengl32.lib
(Tag1: glui32.lib is only neccesary when you are using GLUI, but make sure there's glui32.lib when you are actually using GLUI).(Tag2: GLUI User Manual mentions that this is the proper order of specifying additional libraries for GLUI, GLUT and OpenGL)

9. Enjoy.

-------------------------------------------------------

If you need a complete version of glpng(including glpng.h, glpng.lib, glpngd.lib), you would find hard to find glpng.lib, glpngd.lib, yet you can download a complete version here: http://digsys.linuxberg.com/preview/47311.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值