1.4 KB、29行 表示 生 Blame 履歴
1
2# How to Build
3
4- On Windows with Visual Studio's IDE
5
6Use the provided project file (.vcxproj). Add to solution (imgui_examples.sln) if necessary.
7
8- On Windows with Visual Studio's CLI
9
10```
11set SDL2_DIR=path_to_your_sdl2_folder
12cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_opengl2.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console
13# ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries
14# or for 64-bit:
15cl /Zi /MD /I.. /I..\.. /I%SDL2_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl2.cpp ..\..\backends\imgui_impl_opengl2.cpp ..\..\imgui*.cpp /FeDebug/example_sdl2_opengl2.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x64 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console
16```
17
18- On Linux and similar Unixes
19
20```
21c++ `sdl2-config --cflags` -I .. -I ../.. -I ../../backends main.cpp ../../backends/imgui_impl_sdl2.cpp ../../backends/imgui_impl_opengl2.cpp ../../imgui*.cpp `sdl2-config --libs` -lGL
22```
23
24- On Mac OS X
25
26```
27brew install sdl2
28c++ `sdl2-config --cflags` -I .. -I ../.. -I ../../backends main.cpp ../../backends/imgui_impl_sdl2.cpp ../../backends/imgui_impl_opengl2.cpp ../../imgui*.cpp `sdl2-config --libs` -framework OpenGl
29```