Re: [CEDET-devel] ede-find-file:Method ede-expand-filename called on nil/Cross folder includes
Brought to you by:
zappo
From: Nitin B. <nit...@gm...> - 2012-09-17 05:56:57
|
Hi Eric, I use following snippet to arrange my Project.el files. Ref: http://epsilonvectorplusplus.wordpress.com/2012/04/27/a-functional-introduction-to-cedet-ede/ <snip> ;; Create a Project.ede equivalent for ede-simple-project ;; by telling Emacs to load Project.el files (defun check-for-Project-el () (if (file-exists-p "Project.el") (load-file "Project.el") ) ) (add-hook 'find-file-hook 'check-for-Project-el) <snip> This takes care of loading Project.el when any file in the project is opened. My includes are scattered in directories in the project, and Makefile INCLUDES them during compilation. Is there any way to tell force ede to search includes in all the sub-directories of project Can you please share the steps to setup CEDET development environment in EMACS? i.e. develop and debug This will really help me in long-term. Thanks, Nitin. On Sat, Sep 15, 2012 at 10:59 PM, Eric M. Ludlam <eri...@gm...>wrote: > On 09/14/2012 07:31 AM, Nitin Bodke wrote: > [...] > > > >> My situation is a bit similar to what explained in below post: >> http://stackoverflow.com/**questions/3519965/emacs-** >> source-code-navigation-**features<http://stackoverflow.com/questions/3519965/emacs-source-code-navigation-features> >> Source is code is quite big i.e. more than 6k files, and I have >> MakeFiles in all >> folders that takes care of my build. >> >> My project file is similar to below lines: >> (ede-cpp-root-project "project-name" >> :directory "<project-root-directory>" >> :file "<project-root-directory>/**Project.el" >> :include-path '( "<project-root-directory>" >> ) >> ) >> >> With this, files in the same folder are parsed successfully, and symbols >> are resolved. >> But cross-folder includes are not resolved and they make to the "unknown >> includes" list. >> ede-find-file for unresolved files results in following error: >> eieio-generic-call-primary-**only: Method ede-expand-filename called on >> nil >> >> Is there any solution to this? >> >> I believe I can better utilize this environment by customizing/adding >> more to it. >> How to setup development environment for CEDET? This will help me to >> address >> unresolved issues and contribute back. >> > > Hi Nitin, Welcome to the list. > > First, your project file containing the ede-cpp-root-project needs to be > loaded. If you use a system that makes Project.el load, then perhaps you > are ok, but you probably need to add a line like this: > > (load-file "<project-root-directory>/**Project.el") > > in your .emacs to force it earlier. Once you do that, the EDE project > should be recognized. > > Your include path will need to contain all the subdirectories that have > includes in the way the actual include statements are used. For example, > if a C include says: > > #include "foo/myinclude.h" > > and the header is referenced from your project root directory (prd) like > so: > > <prd>/foo/myinclude.h > > you will be ok, but if the 'foo' directory is in some subdir, you need an > extra line inf your :include path of: > > "/somesubdir" > > where the leading / means start at the base of the project. > > That should get you going. > > Eric > |