diff options
| author | Andre Weissflog <floooh@gmail.com> | 2021-03-27 17:16:10 +0100 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2021-03-27 17:16:10 +0100 |
| commit | 51330305f55b60bc5a95fa53d1b8e3441d3032db (patch) | |
| tree | ddbd3619e5c4caf8f1c178875b5f225928007711 | |
| parent | 40f980ae55e047f11959d5444ae5fdb205ff2088 (diff) | |
sokol_app.h win32: include wchar.h (for wcslen), add build instructions for MINGW gcc
| -rw-r--r-- | sokol_app.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sokol_app.h b/sokol_app.h index e68f3617..0346e4fc 100644 --- a/sokol_app.h +++ b/sokol_app.h @@ -67,7 +67,11 @@ - on iOS with GL: Foundation, UIKit, OpenGLES, GLKit - on Linux: X11, Xi, Xcursor, GL, dl, pthread, m(?) - on Android: GLESv3, EGL, log, android - - on Windows: no action needed, libs are defined in-source via pragma-comment-lib + - on Windows with the MSVC or Clang toolchains: no action needed, libs are defined in-source via pragma-comment-lib + - on Windows with MINGW/MSYS2 gcc: compile with '-mwin32' so that _WIN32 is defined + - link with the following libs: -lkernel32 -luser32 -lshell3' + - additionally with the GL backend: -lgdi32 + - additionally with the D3D11 backend: -ld3d11 -ldxgi -dxguid On Linux, you also need to use the -pthread compiler and linker option, otherwise weird things will happen, see here for details: https://github.com/floooh/sokol/issues/376 @@ -1483,6 +1487,7 @@ inline void sapp_run(const sapp_desc& desc) { return sapp_run(&desc); } #endif #endif #include <stdio.h> /* freopen() */ + #include <wchar.h> /* wcslen() */ #pragma comment (lib, "kernel32") #pragma comment (lib, "user32") |