如何在makefile中使用不同的编译器?

问题描述 投票:0回答:1
CC -c main.ada
process_begin: CreateProcess(NULL, CC -c main.ada, ...) failed.
make (e=2): The system cannot find the file specified.
Makefile:13: recipe for target 'main' failed
mingw32-make: *** [main] Error 2

使用TADS编译器在makefile中编译ada文件.CC是tads编译器

makefile gnu ada
1个回答
2
投票

make找不到CC命令。它必须在你的PATH中,以便make可以找到它。

可能,CC实际上是一个环境变量,你忘了写${CC}而不是CC来检索它的值。

您基本上需要在文档中查找如何从命令行调用编译器,

CC -c main.ada

似乎是错误的方式。一些快速的互联网查询表明该命令实际上命名为tc,而不是CC

© www.soinside.com 2019 - 2024. All rights reserved.