I can achieve this with gcc:
gcc -mwindows -o simple simple.c
But find this only in cmake:
add_executable(simple WIN32 simple.c)
But this is not exactly the same as -mwindows ,
this requires the entry point to be WinMain ,
while gcc -mwindows does not require this (maybe main ).
How should I do it right?
cmake
user198729
source share