Justin Wood
Justin Wood

Reputation: 10061

Attempting to setup C++ project using CEDET/EDE

I have a couple C++ projects that I am working on. I have been using semantic for the sake of autocompletion. However, I want to make better use of the tools out there.

I have the following directory structure

I currently have the following in my .emacs

(load-file "~/.emacs.d/vendor/cedet-bzr/cedet-devel-load.el")

(add-to-list 'semantic-default-submodes 'global-semanticdb-minor-mode)
(add-to-list 'semantic-default-submodes 'global-semantic-idle-local-symbol-highlight-mode)
(add-to-list 'semantic-default-submodes 'global-semantic-idle-scheduler-mode)
(add-to-list 'semantic-default-submodes 'global-semantic-idle-completions-mode)
(add-to-list 'semantic-default-submodes 'global-semantic-idle-summary-mode)
(add-to-list 'semantic-default-submodes 'global-semantic-show-parser-state-mode)
(add-to-list 'semantic-default-submodes 'global-semantic-highlight-edits-mode)
(semantic-mode 1)
(require 'semantic/ia)

(require 'semantic/bovine/clang)

;; PROJECTS

(global-ede-mode t)

(ede-cpp-root-project "MyProject"
                      :name "My Project"
                      :file "/path/to/project/Makefile"
                      :include-path '("/path/to/first/includes"
                                      "/path/to/second/include")
                      :system-include-path '()
                      :spp-table '())

Whenever I have the project open, and C-c . g I get an error in the mini-buffer Method project-rescan called on nil Which prevents me from scanning all of my source files for the sake of auto-completion.

What am I doing wrong here?

I've been attempting to follow Alex Ott's A Gentle Introduction to CEDET but it does not seem to mention anything about this error.

I'm also using CEDET from bazaar.

This is what my M-x cedet-version looks like.

CEDET Version:  2.0
                    Requested   File        Loaded
  Package           Version     Version     Version
  ----------------------------------------------------------
  cedet:            2.0         ok          ok
  eieio:            1.4         ok          ok
  semantic:         2.2         ok          ok
  srecode:          1.2         ok          ok
  ede:              1.2         ok          ok
  cogre:            1.2         ok          Not Loaded
  cedet-contrib:    1.2         nil         Not Loaded

Upvotes: 3

Views: 717

Answers (1)

Eric
Eric

Reputation: 3949

The keybinding C-c . g which is bound to ede-rescan-toplevel is for scanning project definition data and not for parsing your source files. Since the ede-cpp-root-project doesn't have definition data in the project, it never implemented that function.

If you visit a source file, that source file will get parsed as needed. It will also find your includes and parse as needed. Also, if you just wait around a little bit, it will reparse all the files near the one you are editing in idle time, so that by the time you need it, the data should be around.

Upvotes: 1

Related Questions