配置 CMake C++/Java 项目以与 Eclipse 配合使用

发布于 2024-09-12 13:31:04 字数 170 浏览 2 评论 0原文

我目前正在尝试建立一个 VTK 项目,该项目已预先编写了 Cmake makefile 以便与 Eclipse 一起使用。我需要使用的代码是 C++ 和 Java 代码,但我现在主要关心的是能够将现有项目转换为 Eclipse 可以理解的东西以及所有依赖项等。

请随时提出进一步的问题。

干杯。

I'm currently trying to set up a VTK project that has pre written Cmake makefiles to work with Eclipse. The code that I need to use is in both C++ and Java, but my main concern right now is actually to be able to translate the existing project into something that Eclipse can understand with all the dependencies etc.

Please feel free to ask further questions.

Cheers.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

逆光下的微笑 2024-09-19 13:31:04

首先,您需要 Eclipse CDT 包。

然后,您需要生成Eclipse CDT项目:cmake -G "Eclipse CDT4 - Unix Makefiles" /path/to/source/dir

您需要做的最后一步是在当前工作区中导入项目:File ->导入...->将现有项目放入工作区

First of all you need the Eclipse CDT package.

Then you need to generate the Eclipse CDT project: cmake -G "Eclipse CDT4 - Unix Makefiles" /path/to/source/dir.

The last step you need to do is import the project in the current workspace: File -> Import... -> Existing Projects Into Workspace.

风柔一江水 2024-09-19 13:31:04

在 CMake 中配置您的项目以使用 Eclipse CDT 生成器。这将为 eclipse 生成正确的 makefile。

您可能还有兴趣阅读以下讨论使用 Eclipse 的 CMake wiki 页面:
http://www.cmake.org/Wiki/Eclipse_CDT4_Generator
http://www.cmake.org/Wiki/CMake:Eclipse_UNIX_Tutorial#The_Options

Configure your project in CMake to use the Eclipse CDT Generator. That will generate the correct makefiles for eclipse.

You also might be interested in reading the follow CMake wiki pages that talk about using Eclipse:
http://www.cmake.org/Wiki/Eclipse_CDT4_Generator
http://www.cmake.org/Wiki/CMake:Eclipse_UNIX_Tutorial#The_Options

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文