On Wed, 2009-07-15 at 11:30 +0900, Adam Jiang wrote:
> On Tue, Jul 14, 2009 at 9:49 PM, Eric M. Ludlam<eric@...> wrote:
> > On Mon, 2009-07-13 at 19:57 +0900, Adam Jiang wrote:
> >> Hello,
> >>
> >> I am trying to set up CEDET on my box now. But even though I have tried a
> >> lot configuration as the documents said. My Emacs just can't do
> >> auto-completion with Semantic. That is when I press "." or "->" in my cpp
> >> files, semantic return an error with messages like this:
> >>
> >> semantic-analyze-current-context: Cannot analyze buffers not supported
> >> by Semantic.
> >
> > If you are working in C++, and using c++-mode, then Semantic should set
> > itself up automatically. If it does not, perhaps your autoloads were
> > not built correctly. Check the value of c++-mode-hook to make sure it
> > was updated. Also check your *Messages* buffer after loading a C++ file
> > to see if there were any errors.
> >
>
> Thanks, Eric.
>
> There are nothing wrong in *Message* buffer after loading a C++ file. However,
> when I tried to use 'semantic-analyze-debug-assist', I got this.
>
> -------------------------------------------------------------------
> Local Context Parser Failed.
>
> If this is unexpected, then there is likely a bug in the Semantic
> local context parser.
>
> Consider debugging the function semantic-ctxt-current-symbol-and-bounds,
> or implementing a version specific to help-mode.
> -------------------------------------------------------------------
This looks like you tried performing the debug step from a help buffer,
not from a c++ file.
> I am using 1.0pre7. How could I got more debug info.
>
> >> What I am working on is something should be cross-compiled. So, I tried to
> >> set up a project context in my .emacs:
> >>
> >> -------------------------------------------------
> >> (ede-cpp-root-project "TESTProject"
> >> :name "TestProject"
> >> :file "~/path/to/project/root/Makefile"
> >> :include-path '( "../../../../my/include"
> >> "../../../../3pp/include" )
> >> :system-include-path '( "/usr/local/tool-chain/path/sys-root/usr/include" )
> >> )
> >> -------------------------------------------------
> >>
> >> It seems there are two main problem in this configuration:
> >> 1. Many header files could not be found by CEDET;
> >>
> >> Only the header file quoted by "" in the current directory could be
> >> recognized correctly; the others marked with red background color and
> >> could not be looked up;
> >
> > Your technique above should work. If you right click on a red header
> > file, and select "summarze includes current buffer", perhaps it will
> > reveal some useful information, such as a problem with the project
> > identifying your files or something. For example, I hadn't tried using
> > "~" in the :file slot. I don't know why it wouldn't work, but who
> > knows.
>
> I tried to change the paths like "../../xxx" to something like
> "/../../xx". Then
> the include header files can be found. These paths should begin with "/" which
> indicates the root directory of the project. And "~/" like paths work. It seems
> no problem with that.
Right. I forgot about that. I'm glad your found the right solution.
> However, some include files which are both in the host system include paths and
> the toolchain paths, such as <stdio.h>, are marked by yellow background color.
> It is no doubt '/usr/include' and '/toolchain/usr/include' are both in
> the result of
> 'summarise includes current buffer' shows. How could I delete a path
> from system
> include paths list?
You can remove something from the path with command
semantic-remove-system-include.
Good Luck
Eric
|