【问题标题】:C makefile, in CCS, "The system cannot find the file specified"C makefile,在 CCS 中,“系统找不到指定的文件”
【发布时间】:2014-12-01 15:33:50
【问题描述】:

我是 makefile 的新手,所以请多多包涵。我尝试在 Code Composer Studios 中编辑自动生成的 makefile,但出现错误。 这是makefile的摘录

# All Target
all: makefile_project_test1.out
    @echo ''
    @echo '============================'
    @echo 'APPLICATION BUILD SUCCESSFUL'
    @echo '============================'
    @echo ''
    @myfaketarget

# Other Targets
.PHONY: myfaketarget
myfaketarget:
    echo "TEST MY FAKE TARGET"

这是打印出来的错误信息。

process_begin: CreateProcess(NULL, myfaketarget, ...) failed.
make (e=2): The system cannot find the file specified.

gmake: *** [all] Error 2

任何人都可以对此有所了解,并帮助我将其编译干净吗?谢谢

【问题讨论】:

    标签: c makefile target code-composer


    【解决方案1】:

    @myfaketarget 行是命令行。你告诉 make 运行一个名为 myfaketarget 的系统命令。那不是二进制/应用程序/等。但是系统(Windows)无法做到这一点。

    如果您希望 myfaketarget 目标作为 all 目标的先决条件运行,那么您希望在 all: makefile_project_test1.out 行的 makefile_project_test1.out 旁边列出它。

    如果您希望在 运行 all 正文的其余部分之后运行该目标(即 @myfaketarget 行所在的位置),那么您需要自己手动运行 make myfaketarget(可能为 $(MAKE) myfaketarget 取决于制作版本)。

    【讨论】:

    • 就是这样!谢谢!我的意图是让它在“所有”的主体中间运行。 $(MAKE) myfaketarget 成功了!谢谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-02-13
    • 2018-12-22
    • 2014-04-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多