Eclipse-cdt 来索引我的 C++仅代码

发布于 2024-10-17 23:30:09 字数 299 浏览 2 评论 0原文

是否可以让 Eclipse 索引我的 C++ 代码(使用 cmake 构建)?

我更喜欢使用 bash 提示符来编译/运行实际代码,但我想在像 eclipse 这样的编辑器中编写代码,这样我就可以轻松地遵循定义并具有自动完成功能。

我担心 Eclipse 中的 C++ 索引在某些时候会变得不同步,因为我是在外部编译的。

现在我正在使用的方法是这个方法: cmake -G"Eclipse CDT4 - Unix Makefiles"

似乎可以工作,但是当我导入它时,这种方法似乎也会导致 Eclipse 重建我的项目。

Is it possible to have eclipse index my C++ code (built using cmake)?

I prefer to compile/run the actual code using a bash prompt, but I would like to write code in an editor like eclipse so I can easily follow definitions and have auto-completion.

I'm worried the C++ indexing in eclipse will become out of sync at some point because I'm compiling outside.

Right now the method I'm using is this method:
cmake -G"Eclipse CDT4 - Unix Makefiles"

which appears to work, but it seems like this method also causes eclipse to rebuild my project when I import it in.

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

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

发布评论

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

评论(1

遮云壑 2024-10-24 23:30:09

是的,我目前使用 Eclipse 作为编辑器,其索引位于 Eclipse 外部构建的项目上。只需关闭项目中的所有自动构建选项,只要文件发生更改,它仍然会为您索引代码。我的项目使用一堆特殊脚本来执行构建,因此我只是将其保留为现有代码中的默认 C++ 项目,并在创建项目时使用 CDT 构建器。

Yes, I currently use Eclipse as an editor with its index on a project that is built outside of eclipse. Just turn off all the automatic build options in the project, and it will still index the code for you whenever a file changes. My project uses a bunch of special scripts to perform the build, so I just left it as a default c++ project from existing code, using the CDT builder when I created the project.

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