Merge pull request #273 from DanielGibson/fix-sdl2-linux

Examples: Fix SDL2 example for Linux.
This commit is contained in:
omar 2015-07-15 20:15:33 -06:00
commit b4ac413868
3 changed files with 9 additions and 3 deletions

View File

@ -8,3 +8,9 @@
```
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
```

View File

@ -3,7 +3,7 @@
#include <SDL.h>
#include <SDL_syswm.h>
#include <SDL_OpenGL.h>
#include <SDL_opengl.h>
#include <imgui.h>
#include "imgui_impl_sdl.h"

View File

@ -4,9 +4,9 @@
#include "imgui_impl_sdl.h"
#include <stdio.h>
#include <SDL.h>
#include <SDL_OpenGL.h>
#include <SDL_opengl.h>
int SDL_main(int, char**)
int main(int, char**)
{
// Setup SDL
if (SDL_Init(SDL_INIT_EVERYTHING) != 0)