问题来源: project(kinodyntest LANGUAGES CXX) 先指定语言c++ add_executable 后面传入的文件是.c 文件导致cmake报错 c++ 文件为 .cpp !