解决办法: 把含有入口函数(main函数)的 工程 如 cpp-test 设置为启动项 具体操作: 选中 cpp-test 工程 右击 —> 设为启动项目 转载于:https://www.cnblogs.com/VVingerfly/p/5288681.html