nigels-com / glew

The OpenGL Extension Wrangler Library
Other
2.66k stars 622 forks source link

glew 2.1.0 release not compiling on MSYS2 - X11 headers required?? #297

Open dtromb opened 3 years ago

dtromb commented 3 years ago

I'm trying to compile the release 2.1.0 on msys2.

Although config/config.guess is correctly determining the platform triple (x86_64-pc-mingw64), the build fails immediately with the following error:

gcc -fno-builtin -DGLEW_NO_GLU -DGLEW_BUILD -O2 -Wall -W -Iinclude -fno-builtin -fno-stack-protector -o tmp/mingw/default/shared/glew.o -c src/glew.c In file included from src/glew.c:55: include/GL/glxew.h:98:10: fatal error: X11/Xlib.h: No such file or directory 98 | #include <X11/Xlib.h> | ^~~~

Of course, X11 headers nor are not normally present on a Windows system. Nor do we need/have GLX, since no X. Are they really required here, or is the build system broken?

(Additionally, when making the generated sources in ./auto there are a bunch of warnings about regex not matching that I don't remember seeing on other platforms. I don't know how the ./auto system actually works, but maybe this is related, since it is generating the source with the bad dependency above?)

nigels-com commented 3 years ago

Try: $ make SYSTEM=msys-win64, perhaps we need to add x86_64-pc-mingw64 along side that.