| Summary: | SDL_syswm.h with SDL_PROTOTYPES_ONLY broken in C++ mode | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Daniel Scharrer <daniel> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | sezeroz |
| Version: | 2.0.9 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
Should be fixed by https://hg.libsdl.org/SDL/rev/244cdac21bcd Thanks. BTW, this was broken in C-only mode too when SDL_PROTOTYPES_ONLY was defined, because it included close_code.h without including begin_code.h first, possibly messing with structure packings.. |
$ cat test.cpp #include <SDL.h> #define SDL_PROTOTYPES_ONLY 1 #include <SDL_syswm.h> int main() { } $ g++ $(pkg-config sdl2 --cflags --libs) test.cpp In file included from test.cpp:3: /usr/include/SDL2/SDL_syswm.h:318:1: error: expected declaration before ‘}’ token } ^