2023-02-07 13:54:50 +03:00
|
|
|
|
|
|
|
# How to Build
|
|
|
|
|
|
|
|
- On Windows with Visual Studio's CLI
|
|
|
|
|
|
|
|
```
|
|
|
|
set SDL2_DIR=path_to_your_sdl2_folder
|
2023-05-30 21:11:08 +03:00
|
|
|
cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_sdlrenderer2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_sdlrenderer.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib /subsystem:console
|
2023-05-10 13:34:11 +03:00
|
|
|
# ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries
|
2023-02-07 13:54:50 +03:00
|
|
|
# or for 64-bit:
|
2023-05-30 21:11:08 +03:00
|
|
|
cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_sdlrenderer2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_sdlrenderer.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL2.lib SDL2main.lib /subsystem:console
|
2023-02-07 13:54:50 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
- On Linux and similar Unixes
|
|
|
|
|
|
|
|
```
|
2023-05-30 21:11:08 +03:00
|
|
|
c++ `sdl2-config --cflags` -I .. -I ../.. main.cpp ../../backends/imgui_impl_sdl2.cpp ../../backends/imgui_impl_sdlrenderer2.cpp ../../imgui*.cpp `sdl2-config --libs` -lGL
|
2023-02-07 13:54:50 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
- On Mac OS X
|
|
|
|
|
|
|
|
```
|
|
|
|
brew install sdl2
|
2023-05-30 21:11:08 +03:00
|
|
|
c++ `sdl2-config --cflags` -I .. -I ../.. main.cpp ../../backends/imgui_impl_sdl2.cpp ../../backends/imgui_impl_sdlrenderer2.cpp ../../imgui*.cpp `sdl2-config --libs` -framework OpenGl
|
2023-02-07 13:54:50 +03:00
|
|
|
```
|