我认为这个编译器开关是 -Wl,-subsystem,windows。 -Wl,<options> 开关将 <options> 传递给链接器。 -subsystem 开关告诉链接器在生成可执行文件时要针对哪个系统。