如何在Eclipse中运行C项目的自定义makefile?

时间:2018-07-25 14:05:28

标签: eclipse eclipse-cdt

我创建一个C项目,然后在src目录中创建一个makefile。那么如何运行该makefile来构建我的项目?默认的构建器似乎是内部构建器
我将builder更改为GNU Make,然后在C/C++ build中,将build命令设置为mingw32-make -f path_to_my_makefile。之后,ctrl+b构建了我的项目。但是它给出了这样的错误:

mingw32-make: *** No rule to make target 'test.c', needed by 'test.exe'.  Stop

在我的src文件夹中,有test.cMakefile。 Makefile的内容是

 test.exe: test.c
       gcc -Wall test.c -o test.exe

0 个答案:

没有答案