2
votes

I am setting up EMACS for a C++ project on UBUNTU. I am successful so far in installing

  1. ECB
  2. CEDET - I got code completion and other features working.
  3. Color theme

I am having problems with EDE package. The "Project" menu is not showing. I have added (global-ede-mode t) to the .emacs file, but no luck. Do I need to install EDE package separately or it comes with CEDET? How can I solve this issue and have the project menu?

My second problem is with semantic unable to find system include files. It is saying unable to find the header file and so code completion doesn't work for standard library. I have added (require'semantic-gcc) but no luck. I got this solved by adding (semantic-add-system-include "/usr/include/c++/4.3" 'c++-mode) but I don't think this as the correct approach. How can I get (require'semantic-gcc) works?

Here is the .emacs file.

(load-file "~/emacs/cedet/common/cedet.el")
(load-file "~/emacs/cedet/ede/ede.el")
(semantic-load-enable-minimum-features)
(semantic-load-enable-code-helpers)
(semantic-load-enable-gaudy-code-helpers)
(semantic-load-enable-excessive-code-helpers)
(semantic-load-enable-semantic-debugging-helpers)
(require 'semantic-ia)
(require 'semantic-gcc)
(add-to-list 'load-path  "/home/nkn/emacs/ecb-2.40")
(require 'ecb)
(require 'ecb-autoloads)
(setq ecb-tip-of-the-day nil)
(ecb-activate)

;; custom key bindings for smart completion
(global-set-key "\C-x\C-m" 'semantic-ia-complete-symbol-menu)

(load "/home/nkn/emacs/color-theme-6.6.0/color-theme.el")
(color-theme-initialize)
(setq color-theme-is-global t)
(color-theme-classic)

(require 'ede)
(setq global-ede-mode t)

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

I have already checked Alex's article on the subject and couldn't find any information related to my problems.

Any help would be appreciated.

Edit

CEDET version : cedet-1.0pre6

2

2 Answers

3
votes

which version of CEDET are you using?

second line of config isn't necessary - first line should load all...

from lines 3-7 you need to leave only one, with needed set of features. for most cases you need to use only line 4 or 5

EDE should be activated by line (global-ede-mode 1) - at least, this works for me. You can look into my cedet config

1
votes

The EDE "Project" menu only appears if you are in a project. EDE can autodetect projects such as any directories with Automake files in it. It will also auto-detect Emacs, or the Linux kernel.

To create a new project from scratch, use the command `ede-new'. You would then need to know what kind of project you want created. Projects made this way will create a Project.ede file, and can autogenerate Makefiles for you.

For getting the gcc autodetect support working, try:

M-x semantic-c-describe-environment

to see what it might have done. You can also use:

M-x semantic-gcc-setup

to force it to run. It will automatically do so if you are on a gnu, gnu/linux, mac, or cygwin system.