2023-02-07 11:54:50 +01:00
|
|
|
|
|
|
|
# How to Build
|
|
|
|
|
|
|
|
- On Windows with Visual Studio's CLI
|
|
|
|
|
|
|
|
```
|
|
|
|
set SDL2_DIR=path_to_your_sdl2_folder
|
2023-05-30 20:11:08 +02: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 12:34:11 +02:00
|
|
|
# ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries
|
2023-02-07 11:54:50 +01:00
|
|
|
# or for 64-bit:
|
2023-05-30 20:11:08 +02: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 11:54:50 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
- On Linux and similar Unixes
|
|
|
|
|
|
|
|
```
|
2023-05-30 20:11:08 +02: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 11:54:50 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
- On Mac OS X
|
|
|
|
|
|
|
|
```
|
|
|
|
brew install sdl2
|
2023-05-30 20:11:08 +02: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 11:54:50 +01:00
|
|
|
```
|