diff --git a/backend_test/CMakeLists.txt b/backend_test/CMakeLists.txt index 3a76ac9..92a571e 100644 --- a/backend_test/CMakeLists.txt +++ b/backend_test/CMakeLists.txt @@ -76,5 +76,8 @@ target_link_libraries(cimgui_sdl ${IMGUI_LIBRARIES} ${IMGUI_SDL_LIBRARY}) #using library include_directories(../generator/output/) add_executable(test_sdl main.c) +if (MINGW) +target_link_options(test_sdl PRIVATE "-mconsole") +endif() target_link_libraries(test_sdl ${IMGUI_SDL_LIBRARY} cimgui_sdl) diff --git a/backend_test/main.c b/backend_test/main.c index c4e250d..f166d14 100644 --- a/backend_test/main.c +++ b/backend_test/main.c @@ -17,7 +17,7 @@ SDL_Window *window = NULL; int main(int argc, char* argv[]) { - + if (SDL_Init(SDL_INIT_VIDEO) < 0) { SDL_Log("failed to init: %s", SDL_GetError()); return -1; @@ -69,7 +69,7 @@ int main(int argc, char* argv[]) } // check opengl version sdl uses - //SDL_Log("opengl version: %s", (char*)glGetString(GL_VERSION)); + SDL_Log("opengl version: %s", (char*)glGetString(GL_VERSION)); // setup imgui igCreateContext(NULL);