mesonwrap
mesonwrap copied to clipboard
SDL 2 wrap fails to build on Windows / MinGW64
It seems SDL2 requires GLES2 and EGL headers, which aren't provided by the MinGW64 toolchain:
In file included from ../subprojects/SDL2-2.0.12/src/render/opengles2/SDL_render_gles2.c:27:
..\subprojects\SDL2-2.0.12\include/SDL_opengles2.h:35:10: fatal error: GLES2/gl2platform.h: No such file or directory
#include <GLES2/gl2platform.h>
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[...]
[11/175] Compiling C object subprojects/SDL2-2.0.12/libsdl2.dll.p/src_render_direct3d_SDL_render_d3d.c.obj
FAILED: subprojects/SDL2-2.0.12/libsdl2.dll.p/src_render_direct3d_SDL_render_d3d.c.obj
"gcc" "-Isubprojects\SDL2-2.0.12\libsdl2.dll.p" "-Isubprojects\SDL2-2.0.12" "-I..\subprojects\SDL2-2.0.12" "-Isubprojects\SDL2-2.0.12\include" "-I..\subprojects\SDL2-2.0.12\include" "-I..\subprojects\SDL2-2.0.12\src\hidapi\hidapi" "-fdiagnostics-color=always" "-pipe" "-D_FILE_OFFSET_BITS=64" "-Wall" "-Winvalid-pch" "-Wextra" "-Wpedantic" "-g" -MD -MQ subprojects/SDL2-2.0.12/libsdl2.dll.p/src_render_direct3d_SDL_render_d3d.c.obj -MF "subprojects\SDL2-2.0.12\libsdl2.dll.p\src_render_direct3d_SDL_render_d3d.c.obj.d" -o subprojects/SDL2-2.0.12/libsdl2.dll.p/src_render_direct3d_SDL_render_d3d.c.obj "-c" ../subprojects/SDL2-2.0.12/src/render/direct3d/SDL_render_d3d.c
In file included from ../subprojects/SDL2-2.0.12/src/render/direct3d/../../video/windows/../SDL_egl_c.h:28,
from ../subprojects/SDL2-2.0.12/src/render/direct3d/../../video/windows/SDL_windowsopengles.h:29,
from ../subprojects/SDL2-2.0.12/src/render/direct3d/../../video/windows/SDL_windowsvideo.h:47,
from ../subprojects/SDL2-2.0.12/src/render/direct3d/SDL_render_d3d.c:37:
..\subprojects\SDL2-2.0.12\include/SDL_egl.h:29:10: fatal error: EGL/egl.h: No such file or directory
#include <EGL/egl.h>
^~~~~~~~~~~
compilation terminated.
[12/175] Compiling C object subprojects/SDL2-2.0.12/libsdl2.dll.p/src_render_direct3d_SDL_shaders_d3d.c.obj
ninja: build stopped: subcommand failed.
Is there a package you can install to get them? Or is it impossible to compile OpenGL apps with MinGW?
I'm not sure I understand the question...
Windows doesn't really have a package manager, so I'm not sure how I'd install a package for the EGL headers.
But more importantly, EGL isn't an interface that's used on Windows. You use WGL for OpenGL bindings on Windows.
Just to explicitly answer your questions:
Is there a package you can install to get them?
Not as far as I'm aware, see the response above.
Or is it impossible to compile OpenGL apps with MinGW?
There's no problem with using OpenGL with MinGW.