Hello,
I’m trying to build an application using SDL2 on debian 11 using the the system-provided SDL2 headers and libraries.
When building (using clang++), I get this error:
error: no member named 'x11' in 'SDL_SysWMinfo'
return (Aspect_Drawable) info.x11.window;
~~~~ ^
The relevant lines of my source file are:
SDL_SysWMinfo info;
SDL_VERSION(&info.version);
if(SDL_GetWindowWMInfo(mySdlWindow,&info)) {
return (Aspect_Drawable) info.x11.window;
}
I can see that in SDL_syswm.h the x11 struct is surrounded by an #ifdef block, so I tried adding -DSDL_VIDEO_DRIVER_X11 to the compiler options, but no luck, I still get the same error.
Any help is appreciated.