VS2010编译glut-3.7

发布时间:2016-12-10 13:02:58 编辑:www.fx114.net 分享查询网我要评论
本篇文章主要介绍了"VS2010编译glut-3.7",主要涉及到VS2010编译glut-3.7方面的内容,对于VS2010编译glut-3.7感兴趣的同学可以参考一下。

下好了glut(http://www.opengl.org/resources/libraries/glut/glut37.zip)后肯定想着编译它, 于是乎问题出现了, 编译通不过...首先你要修改glutwin32.mak文件, 配置其中的输出目录LIBINSTALLINCLUDEINSTALLDLLINSTALL配置完成然后, 你要保证你的编译环境能访问到win32.mak文件(这个文件在SDK中), 可以尝试使用2010的编译环境.然后请打开\lib\glut\Makefile.win文件, 修改其中内容在文件$(link) $(LFLAGS) -out:$(GLUTDLL) -def:glut.def $(OBJS) $(LIBS)修改为$(link) $(LFLAGS) -out:$(GLUTDLL) -def:glut.def $(OBJS) $(LIBS) -NODEFAULTLIB:$(GLUTLIB)因为一开始dll并不依赖glut32.lib, 但是生成时glut32.lib依赖了自己, 所以容易产生glut32.lib库找不到的错误还没结束, 因为在particle.c(\progs\demos\particle\particle.c)下存在这一段代码错误, 所以还需要修改代码/* timedelta: returns the number of seconds that have elapsed since   the previous call to the function. */floattimedelta(void){    static long begin = 0;    static long finish, difference; #if defined(_WIN32)#include <sys/timeb.h>    static struct timeb tb;     ftime(&tb);    finish = tb.time*1000+tb.millitm;#else#include <limits.h>#include <unistd.h>#include <sys/types.h>#include <sys/times.h>    static struct tms tb;     finish = times(&tb);#endif     difference = finish - begin;    begin = finish;     return (float)difference/(float)1000;  /* CLK_TCK=1000 */}为#if defined(_WIN32) #include <sys/timeb.h> #else #include <limits.h>#include <unistd.h>#include <sys/types.h>#include <sys/times.h> #endif /* timedelta: returns the number of seconds that have elapsed since   the previous call to the function. */floattimedelta(void){    static long begin = 0;    static long finish, difference; #if defined(_WIN32)    static struct timeb tb;     ftime(&tb);    finish = tb.time*1000+tb.millitm;#else    static struct tms tb;     finish = times(&tb);#endif     difference = finish - begin;    begin = finish;     return (float)difference/(float)1000;  /* CLK_TCK=1000 */}然后在glut3.7目录下, 通过编译环境执行glutmake.bathttp://blog.csdn.net/u011558856/article/details/12256605

上一篇:目标检测中背景建模方法总结
下一篇:shell vim常用命令与快捷键

相关文章

相关评论