Hi Eric,

I have tested with the cvs version and I still have this trouble with cedet.

So, I will give you a short example that illustrate this issue.

My project has the following structure

Root Project
  |
  |
  --- Module 1
        |
        -------src
        |
        -------include
  .....
  |
  ---- Module N

For the example  I have reduce the structure to a single module.

Let just have two include :
a.h with the following code
#ifdef _EXPORTS
#define EXPORTAPI __declspec(dllexport)
#else
#define EXPORTAPI __declspec(dllimport)
#endif

and b.h with the following code
#ifndef _GUARD_H_
#define _GUARD_H_

#include "a.h"

class EXPORTAPI foo
{
public :
    int foobar;
    foo();
    ~foo();
};

#endif

I have set EXPORTAPI in the semantic-lex-c-preprocessor-symbol-map :

semantic-lex-c-preprocessor-symbol-map is a variable defined in `semantic-c.el'.
Its value is
(("EXPORTAPI" . ""))

But the class foo is not parsed. Here are the result from bovinate
(("_GUARD_H_" variable
  (:constant-flag t)
  nil #<overlay from 27 to 36 in b.h>)
 ("a.h" include nil
  (:filename "e:/tmp/cedet/Project/include/b.h" unlink-hook
         (semantic--tag-unlink-secondary-overlays)
         secondary-overlays
         (#<overlay from 38 to 52 in b.h>)
         dependency-file "e:/tmp/cedet/Project/include/a.h" link-hook
         (semantic--tag-link-secondary-overlays)
         unlink-copy-hook
         (semantic--tag-unlink-copy-secondary-overlays))
  #<overlay from 38 to 52 in b.h>))


et here are the macro definition from semantic-lex-spp-describe
Macro        Value
_GUARD_H_    nil
EXPORTAPI    nil
__THROW        nil
__const        "const"
__restrict    nil



Thanks a lot for you support.
Cyril


2009/3/23 kiwilex <kiwilex@gmail.com>
Hi Eric,

I will try the cvs version tonight because I cannot access it from my office.

Hope it will work. If not I will provide some example files.

Thanks a lot for you support

Cyril

2009/3/23 Eric M. Ludlam <eric@siege-engine.com>

>>> kiwilex@gmail.com requires approval seems to think that:
>Hi,
>
>I'm trying to use semantic with cedet 1.0pre6 but it can't work because it
>does not take into account my C++ macros that I have define via
>(add-to-list 'semantic-lex-c-preprocessor-symbol-file "path to my include
>containing macro definition") or with
>  (setq semantic-lex-c-preprocessor-symbol-map '
>        (("MACRONAME1" . "VALUE1")
>     ("MACRONAME2" . "VALUE2") ))
>
>When use the function semantic-lex-spp-describe defined macros are present
>in the dumped buffer. But when I launch bovinate it doesn't take them into
>account.
 [ ... ]

Hi,

 First, it would be great if you could try the CVS version of CEDET.
There have been several pre-processor bugs fixed lately.

 If that doesn't help it would be great if you could provide small
example files, perhaps one file with the macros you need, and an
example use.

 If your macros are something like this:

#define MYMACRO(thing) int thing() {

 Where there is no closing }, then that does not work, and likely
won't work until someone refactors how lexical analysis works.

Good Luck
Eric

--
         Eric Ludlam:                       eric@siege-engine.com
  Siege: www.siege-engine.com          Emacs: http://cedet.sourceforge.net