imgui/examples/sdl_opengl_example/README.md
Daniel Gibson 02a0967243 Fix SDL2-example for Linux
The header is called "SDL_opengl.h" - case matters on Linux.

The main() function must indeed be called main(), on Windows it'll be
renamed to SDL_main (for SDL2main.lib) by #define in SDL_main.h
(which is included by SDL.h)

I added an entry to the example's README that describes how to build
it on Linux.
2015-07-16 03:54:44 +02:00

394 B

How to Build

  • On Windows with Visual Studio's CLI

<sdl2path> is your SDL2 folder.

cl /MD /I <sdl2path\include> /I ..\.. main.cpp imgui_impl_sdl.cpp ..\..\imgui.cpp /link /LIBPATH:<sdl2path\lib> SDL2.lib SDL2main.lib
  • On Linux and similar Unices
c++ `sdl2-config --cflags` -I ../.. main.cpp imgui_impl_sdl.cpp ../../imgui.cpp `sdl2-config --libs` -lGL -o sdl2example