Emacs CEDET设置怀疑

时间:2010-05-06 02:15:47

标签: emacs cedet

我今天成功安装了cedet并且大部分都在工作;感谢Alex Ott的Gentle Introduction to Cedet

但是我遇到了问题

当我提供相对于我正在处理的当前文件的确切路径时,自动完成工作正常。

#include "../../opensource/inc/lldp_port.h"
void test_func()
{
    lldp_port port;
    port.blah //here auto-completion worked fine
}

但是我不能一直指定完整的路径(我们在办公室时有eclipse,它会为我们生成makefile)

#include "lldp_port.h"
void test_func()
{
    lldp_port port;
    port. //here auto-completion does not work :(
}

我该怎么做才能解决这个问题?

1 个答案:

答案 0 :(得分:6)

CEDET项目设置功能的一个参数是include-path。有一个例子here

(ede-cpp-root-project "NAME" :file "FILENAME"
     :include-path '( "/include" "../include" "/c/include" )
     :system-include-path '( "/usr/include/c++/3.2.2/" )
     :spp-table '( ("MOOSE" . "")
                   ("CONST" . "const") )
     :spp-files '( "include/config.h" )
     )