An issue in the file "hello_imgui/internal/backend_impls/backend_window_helper/window_geometry_helper.cpp"
Unnecessary include:
#include <filesystem>
Causes build failure when compiling with MinGW 8.1
That's because MinGW 8.1 has a known bug where including causes a build failure: https://stackoverflow.com/a/56493176/7753444
Also requires adding this line
set(HELLOIMGUI_WIN32_EXECUTABLE OFF)
and only then
include(hello_imgui_add_app)
because otherwise the build fails with a linker error:
[build] [ 98%] Linking CXX executable hello_world.exe
[build] G__~1.EXE: error: /SUBSYSTEM:WINDOWS: No such file or directory
[build] G__~1.EXE: error: /ENTRY:mainCRTStartup: No such file or directory
That's because the correct compiler flag for MinGW to compile an executable without a console is:
target_link_options(Main PRIVATE -Wl,--subsystem,windows) # The two options are: windows, console
An issue in the file "hello_imgui/internal/backend_impls/backend_window_helper/window_geometry_helper.cpp" Unnecessary include: causes a build failure: https://stackoverflow.com/a/56493176/7753444
#include <filesystem>
Causes build failure when compiling with MinGW 8.1 That's because MinGW 8.1 has a known bug where includingAlso requires adding this line
set(HELLOIMGUI_WIN32_EXECUTABLE OFF)
and only theninclude(hello_imgui_add_app)
because otherwise the build fails with a linker error:That's because the correct compiler flag for MinGW to compile an executable without a console is:
target_link_options(Main PRIVATE -Wl,--subsystem,windows) # The two options are: windows, console
With those two fixes, the build succeeds. I now created a poll request that fixes the issue https://github.com/pthom/hello_imgui/pull/31#issue-1555642552