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 ?
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.