C 生成文件,在 CCS 中, "The system cannot find the file specified"

标签 c makefile target code-composer

我是 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

任何人都可以阐明这一点,并帮助我将其编译干净吗?谢谢

最佳答案

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

如果您希望 myfaketarget 目标作为 all 目标的先决条件运行,那么您需要将其列在 makefile_project_test1.outall: makefile_project_test1.out 行上。

如果您希望该目标在 之后 运行该 all 主体的其余部分(即 @myfaketarget 行所在的位置)然后你需要手动运行 make myfaketarget 自己(可能是 $(MAKE) myfaketarget 取决于 make 版本)。

关于C 生成文件,在 CCS 中, "The system cannot find the file specified",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27231747/

相关文章:

c++ - 前置 INTERFACE_SOURCES

无法读取C中的输入行

linux - 使用 Linux 加载程序时 ldconfig 错误 :"is not a symbolic link"

javascript - 在CKEditor中,如何在删除目标选项卡的同时将链接设置为默认在新窗口中打开?

docker - 在Makefile中导出环境变量时出现问题

makefile - 如何为同一目标文件的不同依赖项集运行不同的配方

c++ - 如何在 bazel BUILD 文件中指定 -std=c++11 选项?

c - 在 GCC 中禁用字符串的 NUL 终止

c++ - 最大用户模式调度程序线程数

c - 跳转到 C 中 .txt 文件的下一行