cimgui-sokol-starterkit
cimgui-sokol-starterkit copied to clipboard
Defaulting to D3D on windows + gcc
Line 5 of sokol.c #define SOKOL_D3D11 doesn't build with GCC.
#define SOKOL_GLCORE33 worked fine for me.
Had the same problem, im compilling it on mingw64. Maybe adding the following to sokol/sokol.c could work:
#if defined(__MINGW32__)
#define SOKOL_GLCORE33
Had the same problem, im compilling it on mingw64. Maybe adding the following to sokol/sokol.c could work:
#if defined(__MINGW32__) #define SOKOL_GLCORE33
thank you for the answer, I adjust by the hint and modify sokol/sokol.c as:
// sokol implementation library on non-Apple platforms
#define SOKOL_IMPL
#if defined(__MINGW32__)
#define SOKOL_GLCORE33
#elif defined(_WIN32)
#define SOKOL_D3D11
#elif defined(__EMSCRIPTEN__)
#define SOKOL_GLES2
#elif defined(__APPLE__)
// NOTE: on macOS, sokol.c is compiled explicitely as ObjC
#define SOKOL_METAL
#else
#define SOKOL_GLCORE33
#endif
#include "sokol_app.h"
#include "sokol_gfx.h"
#include "sokol_glue.h"
#define CIMGUI_DEFINE_ENUMS_AND_STRUCTS
#include "cimgui.h"
#define SOKOL_IMGUI_IMPL
#include "sokol_imgui.h"
complie and link success. hope helps.