EMACS for C ++ Development - CEDET Code Completion Issue and Project

I am creating EMACS for a C ++ project on UBUNTU. So far I have had success installing

  • ECB
  • CEDET - I got code completion and other features.
  • Color theme

I'm having problems with the EDE package. The Project menu is not displayed. I added (global-ede-mode t) to the .emacs file but no luck. Do I need to install the EDE package separately or does it come with CEDET? How can I solve this problem and have a project menu?

My second problem has to do with semantics that cannot find files with the system. He says he can't find the header file and therefore code completion doesn't work for the standard library. I added (require'semantic-gcc) but no luck. I solved it by adding (semantic-add-system-include "/usr/include/c++/4.3" 'C ++ - mode), but I don't think this is the right way. How can I get (require'semantic-gcc) working?

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 already checked Alex's article on this subject and could not find any information related to my problems.

Any help would be appreciated.

Edit

CEDET version: cedet-1.0pre6

+2


source to share


2 answers


which version of CEDET are you using?

the second line of config is not needed - the first line should load everything ...



from lines 3-7, you need to leave only one, with the necessary set of functions. for most cases you only need to use lines 4 or 5

EDE needs to be activated on line (global-ede-mode 1) - at least this works for me. You can look at my cedet config

+3


source


The EDE "Project" menu only appears if you are in a project. EDE can automatically detect projects such as any Automake file directories. It will also automatically detect Emacs or the Linux kernel.

To create a new project from scratch, use the `ede-new 'command. Then you will need to know what kind of project you want to create. Projects created this way will create a Project.ede file and can automatically generate a Makefile for you.

To get gcc autodetection support try:

Mx semantic-c-description-environment



to see what he could do. You can also use:

Mx semantic-gcc-setup

to make it work. It will automatically do this if you are on a gnu, gnu / linux, mac or cygwin system.

+1


source







All Articles