What's the equivalent of gcc's -mwindows option in cmake?

后端 未结 5 1955
后悔当初
后悔当初 2020-12-11 16:42

I\'m following the tuto:

http://zetcode.com/tutorials/gtktutorial/firstprograms/

It works but each time I double click on the executable,there is a console w

5条回答
  •  -上瘾入骨i
    2020-12-11 17:20

    add_executable(Cmd WIN32 cmd.c)

    Tells CMake this is a Windows program, and it looks for WinMain instead of main. If you want to see the flags being used you can run make VERBOSE=1. The question might be how do you define WinMain for gtk apps? I know with Qt, you link in a library that defines it for you.

提交回复
热议问题