Question

So in my process of switching to emacs I find it very difficult to forgo Visual Studio 2010 for C++. Trying to setup cedet for emacs didn't make it any easier. So I used the gentle introduction by Alex Ott and my init file looks similar to the one provided :

(load-file "~/.emacs.d/plugins/cedet/common/cedet.el")
(global-ede-mode 1)     
(semantic-load-enable-excessive-code-helpers)
(require 'semanticdb)
(global-semanticdb-minor-mode 1)
(setq semantic-ectag-program "C:/devel/ctags/ctags58/ctags.exe")
(semantic-load-enable-secondary-exuberent-ctags-support)
(require 'semantic-ia)
(require 'semantic-gcc)
(setq-mode-local c-mode semanticdb-find-default-throttle
                          '(local unloaded system recursive))
(ede-enable-generic-projects)
(global-srecode-minor-mode 1)

All good and dandy but when I try to open a cpp file which has a header (array_loader.h) in the same directory and try to do code completion for the register_reader() method:

array_loader al; al.register_reader();

I get "cannot find types for 'array_loader al' ". Paradoxically, auto-complete-mode works seamlessly. Do they interfere?

I just checked out 1.1 beta using bazaar and then byte compiled it. I didn't setup a project because all my projects are cmake based and they don't have a single path for include files. each sub-library of my project has the headers in the same directory. Is there a way to parse a CMakeLists.txt and feed that information to ede or semantic? Even if there wasn't this basic example should work. Am I doing something wrong?

Was it helpful?

Solution

Well in case anyone has this problem again, I managed to solve it by setting up my cedet init files as indicated by Alex Ott:

https://github.com/alexott/emacs-configs/blob/master/rc/emacs-rc-cedet.el

Also I defined my cmake project and used the recursive find to go through my cmake project folders to find the headers. It is still strange how cpp files external to the project could not find the signature of the classes/methods although they were defined in headers found in the same folder. the semanticcdb throttle was set as follows

(setq-mode-local cpp-mode semanticdb-find-default-throttle 
                      '(project local unloaded system recursive)) 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top