在Windows上使用MinGW编译Glew git代码

时间:2013-01-08 16:41:57

标签: windows git mingw msysgit glew

在glew项目页面上查看时,有一个包含最新代码的git存储库。

克隆存储库我看到我需要下载扩展。 Makefile有一个名为 extensions 的目标,可以从互联网上下载所有内容。

问题是这个Makefile是Unix系统的默认设置。当我尝试在Windows上使用 msysgit mingw 构建glew时,出现以下错误:

mingw32-make.exe extensions
mingw32-make -C auto
mingw32-make[1]: Entering directory `glew/auto'

--------------------------------------------------------------------
Creating descriptors
--------------------------------------------------------------------
rm -rf extensions/gl
bin/update_ext.sh extensions/gl registry/gl blacklist
Integer overflow in hexadecimal number at bin/parse_spec.pl line 337.
Hexadecimal number > 0xffffffff non-portable at bin/parse_spec.pl line 337.
Integer overflow in hexadecimal number at bin/parse_spec.pl line 337.
Hexadecimal number > 0xffffffff non-portable at bin/parse_spec.pl line 337.
Integer overflow in hexadecimal number at bin/parse_spec.pl line 337.
Hexadecimal number > 0xffffffff non-portable at bin/parse_spec.pl line 337.
Integer overflow in hexadecimal number at bin/parse_spec.pl line 337.
Hexadecimal number > 0xffffffff non-portable at bin/parse_spec.pl line 337.
Integer overflow in hexadecimal number at bin/parse_spec.pl line 337.
Hexadecimal number > 0xffffffff non-portable at bin/parse_spec.pl line 337.
bin/filter_gl_ext.sh     extensions/gl
Can't do inplace edit on extensions/gl/GL_HP_occlusion_test: Permission denied.
Can't open extensions/gl/GL_HP_occlusion_test: No such file or directory.
Can't do inplace edit on extensions/gl/GL_ARB_vertex_buffer_object: Permission d
enied.
Can't do inplace edit on extensions/gl/GL_ARB_vertex_shader: Permission denied.
Can't open extensions/gl/GL_ARB_vertex_shader: No such file or directory.
Can't open extensions/gl/GL_ARB_vertex_shader: No such file or directory.
Can't open extensions/gl/GL_ARB_vertex_shader: No such file or directory.
grep: extensions/gl/GL_ARB_vertex_shader: No such file or directory
mingw32-make[1]: *** [extensions/gl/.dummy] Error 2
mingw32-make[1]: Leaving directory `glew/auto'
mingw32-make: *** [extensions] Error 2

我知道这来自 perl ,但是如何使用MinGW和msysgit在Windows中解决它? 我首先考虑其他环境设置,如 cygwin ,但我已经有一个设置,使用我当前的设置构建了十几个其他项目。

1 个答案:

答案 0 :(得分:1)

问题可能来自于您使用MinGW中的make(您的mingw32-make),但来自MSYS的perl(其中包含 Git for Windows )。所以你需要的是一个MSYS make

让我在继续之前指出一个常见的误解: msysgit 是用于创建 Git for Windows 安装程序的开发环境的名称(另请参阅this answer )。因此,通常只想在Windows上使用Git的人应该下载 Git for Windows ,而不是 msysgit msysgit 附带了各种通常不需要的开发内容,例如gcc和(tadaa)make。所以在你的情况下,你真的需要 msysgit ,我推荐来自here的网络安装程序。安装完成后,您应该可以启动C:\msysgit\msys.bat,切换到 glew 目录,然后运行make extensions