Emacs CEDET 和系统包含路径

发布于 2024-09-01 00:52:20 字数 605 浏览 6 评论 0原文

我想添加 openMPI 库标头的路径。因此,在我发现所有 openMPI 标头都在 /usr/lib/openmpi/include/* 中后,我将这两行添加到我的 .emacs 中:

(semantic-add-system-include "/usr/lib/openmpi/include" 'c-mode)
(semantic-add-system-include "/usr/lib/openmpi/include" 'c++-mode)

我认为这没问题,但它不起作用!
这是semantic-c-describe-envirnoment 命令的结果:

该文件的系统包含路径是:
/usr/include
/usr/local/include/
/usr/lib/gcc/i486-linux-gnu/4.4.3/include/
/usr/lib/gcc/i486-linux-gnu/4.4.3/include-fixed/
/usr/include/

无法弄清楚出了什么问题或我错过了什么

谢谢

I'd like to add path to the openMPI library headers. So, after i found all openMPI headers are in /usr/lib/openmpi/include/* i added these two lines to my .emacs:

(semantic-add-system-include "/usr/lib/openmpi/include" 'c-mode)
(semantic-add-system-include "/usr/lib/openmpi/include" 'c++-mode)

I think this is ok, but it's not working!
This is the result of semantic-c-describe-envirnoment command:

This file's system include path is:
/usr/include
/usr/local/include/
/usr/lib/gcc/i486-linux-gnu/4.4.3/include/
/usr/lib/gcc/i486-linux-gnu/4.4.3/include-fixed/
/usr/include/

Can't figure out what's wrong or what i'm missing

Thanks

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

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

发布评论

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

评论(2

我的影子我的梦 2024-09-08 00:52:20

我没有解释为什么它不起作用。由于我遇到了同样的问题,经过实验,我发现了一个对我有用的修复方法:

(defun my-semantic-hook ()
  (semantic-add-system-include "/usr/lib/openmpi/include" 'c-mode)
  (semantic-add-system-include "/usr/lib/openmpi/include" 'c++-mode))
(add-hook 'semantic-init-hooks 'my-semantic-hook)

I have no explanation as to why it doesn't work. Since I had the same problem, experimenting I found a fix that worked for me:

(defun my-semantic-hook ()
  (semantic-add-system-include "/usr/lib/openmpi/include" 'c-mode)
  (semantic-add-system-include "/usr/lib/openmpi/include" 'c++-mode))
(add-hook 'semantic-init-hooks 'my-semantic-hook)
GRAY°灰色天空 2024-09-08 00:52:20

我尝试过这个例子,发现它“对我有用”。您最好的选择是加入 cedet-devel 邮件列表,在那里可以更轻松地帮助您完成在 Emacs 中调试问题的过程。

https://lists.sourceforge.net/lists/listinfo/cedet-devel

I've given this example a try, and find that it "works for me". Your best bet is to join the cedet-devel mailing list where it will be easier to help your through the process of debugging the issue in your Emacs.

https://lists.sourceforge.net/lists/listinfo/cedet-devel

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