如何将C makefile项目导入eclipse或放入eclipse下

Dim*_*ims 23 c c++ eclipse linux makefile

我在Linux下有标准的源代码包,需要运行

./configure
make
Run Code Online (Sandbox Code Playgroud)

编译它(它工作正常).

这些文件大多是C/C++

是否可以将此项目置于Eclipse控件之下?我希望浏览定义等...

更新1

我在Ubuntu上运行Eclipse Indigo.它当然包含CDT.

当我选择时File-Import,我看不到匹配的选项C/C++.在General我有,Existing Projects into WorkspaceNo project are found to import如果我将此向导指向我的项目根目录,我会得到.

更新2

我用Ubuntu包管理器安装了Eclipse.可能这是错的.

man*_*479 21

首先运行./configure以生成Makefile.之后,如果安装了CDT,只需选择"File-> New-> Makefile Project With Existing Code"选项并指向存储Makefile的目录.


小智 6

创建一个新项目,确保在执行此操作时取消选中"使用默认位置"选项.在位置字段中添加源树路径.现在在项目类型窗口中选择"Makefile Project".

在"构建器设置"(项目>属性)中,取消选中"使用默认构建命令"并添加:

make -f /<your project location/Makefile
Run Code Online (Sandbox Code Playgroud)

如果您的makefile以其他方式命名,则可以在此处进行更改.

To run your application, add the application in Run Configurations. See full instructions here.