简体   繁体   English

在Linux中使用Eclipse C ++ CDT

[英]Using Eclipse C++ CDT in Linux

I want to use Eclipse to develop C++ projects on Linux. 我想使用Eclipse在Linux上开发C ++项目。 Particularly I want to modify stable and widely used open source projects using the Eclipse CDT. 特别是我想使用Eclipse CDT修改稳定且广泛使用的开源项目。 One of them is Intel Opencv. 其中之一是英特尔Opencv。 There are tutorials to create simple c++ projects like here: 有一些教程可以创建简单的c ++项目,如下所示:

I have seen plenty of tutorials for using Eclipse CDT to write programs in OpenCv like here: 我已经看过很多关于使用Eclipse CDT在OpenCv中编写程序的教程,如下所示:

However I want to use Eclipse to make changes to the OpenCv platform itself and compile it from there. 但是,我想使用Eclipse来更改OpenCv平台本身并从那里进行编译。 I really like many of Eclipse's features like: 我非常喜欢Eclipse的许多功能,例如:

  • Syntax highlighting 语法突出显示
  • Outline 大纲
  • Code assist 代码辅助
  • Code templates 代码模板
  • Code history 代码历史
  • etc. 等等

Would someone write a small tutorial on how one can make a project in Eclipse from the OpenCv tarball? 有人会写一个关于如何从OpenCv tarball在Eclipse中创建项目的小教程吗? I would use Eclipse CDT on Linux. 我会在Linux上使用Eclipse CDT。

Can Eclipse CDT recognize Makefile as it can do for Ant scripts? Eclipse CDT能否识别Makefile,因为它可以为Ant脚本做什么?

I made the experience that for OpenCV using cmake is the way to go. 我为使用cmake的 OpenCV提供了经验。 You can unzip the cmake source code and use cmake to compile it. 您可以解压缩cmake源代码并使用cmake进行编译。 Even after your changes. 即使你改变了。 There are some tools to integrate cmake into eclipse but I found them unstable or not very mature so I use cmake from a terminal to compile and eclipse for editing the source files. 有一些工具可以将cmake集成到eclipse中,但我发现它们不稳定或不太成熟所以我使用来自终端的cmake进行编译和eclipse来编辑源文件。

Simplest way to deal with existing C sources with their own build setup is generally to use a 'Makefile Project' rather the 'managed Project'. 使用自己的构建设置处理现有C源的最简单方法通常是使用'Makefile Project'而不是'managed Project'。 For cmake, go to the 'Make Targets' view and enter cmake as the executable. 对于cmake,请转到“Make Targets”视图并输入cmake作为可执行文件。

http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.cdt.doc.user/getting_started/cdt_w_newproj.htm http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.cdt.doc.user/getting_started/cdt_w_newproj.htm

How to import C makefile project into eclipse or put in under eclipse 如何将C makefile项目导入eclipse或放入eclipse下

http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.cdt.doc.user/getting_started/cdt_w_existing_code.htm http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.cdt.doc.user/getting_started/cdt_w_existing_code.htm

If you follow Janusz's advice about using cmake you can find here a good tutorial about using cmake and its eclipse projects generator (I actually followed it no long time ago :-) ). 如果您遵循Janusz关于使用cmake的建议,您可以在这里找到关于使用cmake及其eclipse项目生成器的一个很好的教程 (我实际上不久前也遵循它:-))。 In this link you will find more information about that generator (Eclipse CDT4 Generator) 在此链接中,您将找到有关该生成器的更多信息(Eclipse CDT4 Generator)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM