1
votes

I try to make a class diagram from existing C++ code using Enterprise Architect 9.3.935. I do Code Engineering / Import Source Directory and then select my directory.

However, I get tons of error of type: "There was an error parsing C:\xxxxx # on line xxxx. Unexpected symbol: XXXXX. You may need to define a language macro."

In the code, I have a macro for exporting DLL and most of my class look like :

class MACRO_FOR_DLL_EXPORT CMyClassName { ... }

or

class MACRO_FOR_DLL_EXPORT CMyClassName : public CHerMother { ... }

The unexpected symbol is usually "{" in the first case and "CHerMother" in the second.

How to fix this issue, is it related with the macro ?

1
any hint on the application you are using to do that? - Andy Prowl
Read your post objectively, is there enough information to assist other people, such as the smallest amount of code that creates the issue? - Thomas Matthews
Sorry, let me know if it is now easier to understand the context - Palmira
When you say you "have a macro", do you mean in the source or in EA? - Uffe
@Uffe : in my code. I just edited my post to reflect it. Got it fix by defining the symbol as macro in EA but I'd be happy to hear what you have to say about the problem I had. - Palmira

1 Answers

4
votes

You can declare several Language specific macros in your EA project, to ignore these when reverse engineering (parsing) code. There's a number of standard C/C++ framework macros predefined natively by EA.