1.6 KB、40行 表示 生 Blame 履歴
1
2# How to Build
3
4## Windows with Visual Studio's IDE
5
6Use the provided project file (.vcxproj). Add to solution (imgui_examples.sln) if necessary.
7
8## Windows with Visual Studio's CLI
9
10Use build_win32.bat or directly:
11```
12set SDL3_DIR=path_to_your_sdl3_folder
13cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL3_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp /FeDebug/example_sdl3_opengl3.exe /FoDebug/ /link /libpath:%SDL3_DIR%\lib\x86 SDL3.lib opengl32.lib /subsystem:console
14# ^^ include paths ^^ source files ^^ output exe ^^ output dir ^^ libraries
15# or for 64-bit:
16cl /Zi /MD /utf-8 /I.. /I..\.. /I%SDL3_DIR%\include main.cpp ..\..\backends\imgui_impl_sdl3.cpp ..\..\backends\imgui_impl_opengl3.cpp ..\..\imgui*.cpp /FeDebug/example_sdl3_opengl3.exe /FoDebug/ /link /libpath:%SDL3_DIR%\lib\x64 SDL3.lib SDL2mainopengl32.lib /subsystem:console
17```
18
19## Linux and similar Unixes
20
21Use our Makefile or directly:
22```
23c++ `sdl3-config --cflags` -I .. -I ../.. -I ../../backends
24 main.cpp ../../backends/imgui_impl_sdl3.cpp ../../backends/imgui_impl_opengl3.cpp ../../imgui*.cpp
25 `sdl3-config --libs` -lGL -ldl
26```
27
28## macOS
29
30Use our Makefile or directly:
31```
32brew install sdl3
33c++ `sdl3-config --cflags` -I .. -I ../.. -I ../../backends
34 main.cpp ../../backends/imgui_impl_sdl3.cpp ../../backends/imgui_impl_opengl3.cpp ../../imgui*.cpp
35 `sdl3-config --libs` -framework OpenGl -framework CoreFoundation
36```
37
38## Emscripten
39
40As of 2023-05-30 Emscripten doesn't support SDL3 yet.