【问题标题】:This file does not belong to any project Code insight might not work properly when opening project in clion此文件不属于任何项目 在 clion 中打开项目时代码洞察可能无法正常工作
【发布时间】:2018-09-04 16:02:59
【问题描述】:

我是 C 编程和 Clion 接口的新手,所以请分享屏幕截图让我更好地理解它。最近我下载了一个训练文件 .c,当我在 CLion 中打开它时,编译器将无法工作。相反,编译器生成了我的另一个 .c 文件。到目前为止 CLion 工作正常,但不知何故 CLion 有这个下载文件的问题。虽然它们在 CodeBlocks 中运行良好,但如何解决这个问题?

Clion file does not belong_img 这是我的训练文件c-learn

【问题讨论】:

标签: compiler-errors cmake clion


【解决方案1】:

将新的可执行文件添加到新文件。 您需要打开 CMakeLists.txt 并添加类似 add_executable(foo 02-12_value2.c)

【讨论】:

  • 谢谢,马克西姆!你只需要添加 foo your_c_file_name
猜你喜欢
  • 2018-02-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-10-08
  • 1970-01-01
  • 2018-09-18
  • 2022-07-02
相关资源
最近更新 更多