【问题标题】:an error appears when i clean project in codelite我在 Codelite 中清理项目时出现错误
【发布时间】:2020-05-01 21:48:46
【问题描述】:

我正在迈出 C++ 学习的第一步 我正在使用带有“MinGW”的“codelite”IDE,当我清理项目时,我发现出现错误,尽管我可以构建项目并成功运行 这里是构建日志文件:

C:\Windows\system32\cmd.exe /C C:/MinGW/bin/mingw32-make.exe -j2 SHELL=cmd.exe -e -f  Makefile clean
"----------Cleaning project:[ project1 - Debug ]----------"
process_begin: CreateProcess(NULL, rm -f -r Debug/, ...) failed.
make (e=2): The system cannot find the file specified.
mingw32-make.exe[1]: *** [clean] Error 2
mingw32-make.exe[1]: Entering directory 'C:/Users/UNI/Documents/section4/project1'
rm -f -r Debug/
project1.mk:108: recipe for target 'clean' failed
mingw32-make.exe[1]: Leaving directory 'C:/Users/UNI/Documents/section4/project1'
mingw32-make.exe: *** [clean] Error 2
Makefile:7: recipe for target 'clean' failed
====2 errors, 0 warnings====

【问题讨论】:

  • rm -f -r Debug/ 你是否为此安装了某种类型的 linux 工具? rm 不是 windows 默认拥有的。也许codelite 允许你更改命令
  • rd /q /s Debug/ 将是等效的 windows 命令。
  • 我没有安装任何 linux 软件,我不知道如何编辑或更改此命令

标签: c++ mingw codelite


【解决方案1】:

codelite 程序创建的makefile 不是为windows 设计的。我对codelite 的解决方案如下:

  1. 安装git。安装程序必须将路径 git/bin 添加到 PATH。这是sh.exe 所在的位置。
  2. 在所需编译器的 codelite“构建设置”中,将 Make 参数中的 "SHELL=cmd.exe" 替换为 "SHELL=sh.exe"
  3. project 设置中将“Makefile Generator”设置为“CodeLite Makefile Generator - UNIX”。

非常适合控制台应用程序项目,codelite 15.0.6windows 7 x64 pro

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-05-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-28
    • 1970-01-01
    相关资源
    最近更新 更多