首页 > 其他分享 >cannot configure a CMake target with CLion (Nothing to run on)?

cannot configure a CMake target with CLion (Nothing to run on)?

时间:2023-03-28 14:56:43浏览次数:53  
标签:CMakeLists run configure cannot Nothing CMake txt

ERROR:打开之前的stm32项目 Clion 无法识别 CMakeLists.txt,编译按钮变成灰色,点击run按钮会产生 cannot build xxx.elf 或者 Nothing to run on,在run配置target和executable不到elf文件。

 

解决方法:抽风了大概,打开右上角run configurations配置删除CMake Application,然后新建一个c/c++ File来跑main.c,结果自然是跑不通的。再打开一次删除c/c++ File编译,重建CMake Application,保存退出。

 

在main.c页面报错说找不到 CMakeLists.txt,选手动加载项目根目录下的 CMakeLists.txt

 

 

标签:CMakeLists,run,configure,cannot,Nothing,CMake,txt
From: https://www.cnblogs.com/Kaelthas/p/17265130.html

相关文章