For those who have this issue using CMake under Windows (see Amoo’s comment), here’s a solution here.
In short, you need to add WIN32
to your add_executable()
statements:
add_executable(GuiApplication WIN32 src/main.cpp)
For further details, see the CMake documentation on add_executable
and WIN32_EXECUTABLE
.