Hi, Eric.

I have studied the global info in cedet.info, in my comprehension, when I setup an ede project and set ede-locate-setup-options correctly and create a global database in my project root directory,  semantic can find all the head file automatically. Thus if I don't specify include-path in ede project, semantic also can find the define of any structure and complete its members (I'm a C programmer).

Does my comprehension right?
I configure my .emacs as bellow, but I can not get a structure member's completion if it is defined in other directory.

Is there something wrong in my configuration or semantic still need specific include path in ede project?

thanks.

;; Load CEDET
(load-file "~/lisp/cedet/common/cedet.el")
;; Enable EDE (Project Management) features
(global-ede-mode 1)
;; Enable EDE for a pre-existing C++ project
(ede-cpp-root-project "test2" :file "~/work/emacs/test2/test2.c")
(setq ede-locate-setup-options
           '(ede-locate-global
         ede-locate-base))
(semantic-load-enable-minimum-features)
(setq semanticdb-default-save-directory (expand-file-name "~/.semanticdb")) 
(require 'semanticdb-global)
(semanticdb-enable-gnu-global-databases 'c-mode)

在2009-01-22,"Eric M. Ludlam" <eric@siege-engine.com> 写道:
>Hi,
>
>  To start using GNU Global to find files with EDE, you just need to
>customize the variable `ede-locate-setup-options'.  All project types
>use the same locate system for finding files.
>
>  There is a section on GNU Global in cedet/common/cedet.info that
>explains integrating GNU Global into the various CEDET tools.
>
>Good Luck
>Eric
>
>>>> yupeng82921 <yupeng82921@163.com> seems to think that:
>>
>>hi, Eric.
>>
>>You'd ever said semantic can use gnu global to find head file for C or C++ program. To do that we should set up an EDE project and configure the variable "ede-locate-setup-options".
>>
>>Now I create an EDE project like this:
>>(ede-cpp-root-project "test2.c" :file "/home/yupeng/work/emacs/test2/test2.c"
>>     :include-path '( "")
>>     :system-include-path '( "" )
>>     :spp-table '( ("MOOSE" . "")
>>                   ("CONST" . "const") ) )
>>
>>But I don't know how to configure "ede-locate-setup-options". Is there some example to reference?
>  [ ... ]



网易邮箱,中国第一大电子邮件服务商