c-如何使用eclipse将额外的源代码添加到导入的现有makefile项目中



我有一个现有的makefile c-Project。我用makemake install在shell中预先构建了它,正如ReadMe文件中所描述的那样。然后我将其导入为File->Import"Existing code as Makefile Project"。我再次按下了"构建"按钮,但我认为,由于它是以前从外壳中构建的,所以没有再次构建。

控制台显示:

09:14:15 **** Incremental Build of configuration Default for project candis ****
make all 
echo "Make each directory individually."
Make each directory individually.
echo "``make lib'' makes the libraries"
make lib'' makes the libraries
echo "``make clean'' cleans out binaries and .o files everywhere"
make clean'' cleans out binaries and .o files everywhere
echo "``make tar'' tars up a distribution and redoes the libs"
make tar'' tars up a distribution and redoes the libs
09:14:15 Build Finished (took 136ms)

然后我尝试创建一个新的源代码文件,我将其命名为"prog1.c"。我保存了它,并再次按下"构建"按钮,但我认为没有发生任何事情,所以我的程序。

如何创建工作函数?我可能会更改Makefile中的某些内容?

您必须调整makefile,否则将不会编译"prog1.c"文件。

原因是编译器不知道你要编译什么,除非你告诉他。这就是makefiles的作用。

你有什么类型的makefile?如果可以的话,我也许可以帮你。

最新更新