【问题标题】:How to add additional source code to an imported existing makefile-project with eclipse?如何使用 eclipse 向导入的现有 makefile 项目添加额外的源代码?
【发布时间】:2014-02-27 08:22:28
【问题描述】:

我有一个现有的 makefile c-Project。正如自述文件中所述,我使用 makemake install 在我的 shell 中预构建了它。 然后我将其导入为 File->Import "Existing code as Makefile Project"。我再次按下“构建”按钮,但我认为,因为它是在 shell 之前构建的,所以它没有再次构建。

控制台说:

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 中的某些内容?

【问题讨论】:

    标签: c eclipse import makefile project


    【解决方案1】:

    必须适配makefile,否则“prog1.c”文件编译不出来。

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

    你有什么样的makefile?如果可以的话,我可能会帮助你。

    【讨论】:

    • 我试图回答我自己的问题,但到目前为止这对我来说是不可能的(声誉太低了)。我可以给您发一封电子邮件,您可以在这里发布吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-12-01
    • 2012-01-12
    • 2011-06-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多