企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
[TOC] ## cmake设置入口是main还是winmain ``` if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") add_executable(${PROJECT_OUTNAME} ${PROJECT_SOURCES}) elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") add_executable(${PROJECT_OUTNAME} WIN32 ${PROJECT_SOURCES}) #WIN32 So the console window does not open on Windows endif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") ```