SDL2/OpenGL3 compile error #8751

Closed
opened 2025-06-28 15:11:06 +00:00 by adam-lafontaine · 0 comments
adam-lafontaine commented 2025-06-28 15:11:06 +00:00 (Migrated from github.com)

Version/Branch of Dear ImGui:

Version 1.92.1, Branch: master

Back-ends:

imgui_impl_sdl2.cpp + imgui_impl_opengl3.cpp

Compiler, OS:

Linux (Ubuntu 20.04) + GCC (g++-11)

Full config/build information:

No build. Compile error.

Details:

Property name 'Status' of struct ImTextureData in imgui.h conflicts with '#define Status int' defined in /usr/include/X11/Xlib.h

GCC error:
.../imgui/backends/imgui_impl_opengl3.cpp:541:22: error: expected unqualified-id before ‘int’
541 | if (tex->Status != ImTextureStatus_OK)

No issue when using the SDL3/OpenGL3 backends

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

None.

### Version/Branch of Dear ImGui: Version 1.92.1, Branch: master ### Back-ends: imgui_impl_sdl2.cpp + imgui_impl_opengl3.cpp ### Compiler, OS: Linux (Ubuntu 20.04) + GCC (g++-11) ### Full config/build information: No build. Compile error. ### Details: Property name 'Status' of struct ImTextureData in imgui.h conflicts with '#define Status int' defined in /usr/include/X11/Xlib.h GCC error: .../imgui/backends/imgui_impl_opengl3.cpp:541:22: error: expected unqualified-id before ‘int’ 541 | if (tex->Status != ImTextureStatus_OK) No issue when using the SDL3/OpenGL3 backends ### Screenshots/Video: _No response_ ### Minimal, Complete and Verifiable Example code: None.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ocornut/imgui#8751
No description provided.