0
votes

I'm trying to generate a class diagram, using reverse engineering, but the following is happening:

There was an error parsing C:\Documents and Settings\Meus documentos\EA_Documentos\Modelos\Environment\class\Factory.h on line 11. Unexpected symbol: ISIMFactory
You may need to define a language macro.

There was an error parsing C:\Documents and Settings\Meus documentos\EA_Documentos\Modelos\Environment\class\Model.h on line 99. Unexpected symbol: ISIMModel
You may need to define a language macro.

There are many more of these.

This is the corresponding code in CSIMEnvironmentModel.h

class SIMMDLENVv01_EXPORT CSIMEnvironmentModel // line 99
: public ISIMModel
, public ISIMEventSource
, public ISIMScheduledModel
, public ISIMExecut
, public ISIMPublisher
{
public:

    CSIMEnvironmentModel(const std::string &a_modelType);
virtual ~CSIMEnvironmentModel(void);

and CSIMEnvFactory.h

class SIMMDLENVv01_EXPORT CSIMEnvFactory // line 11
: public ISIMFactory
{
public:
    CSIMEnvFactory();
    virtual ~CSIMEnvFactory(void);
    std::vector<ISIMModel*> InstanceModel(const std::string &a_modelType, const    std::string &a_conf);
};

What's the reason for this error message?

1
Can you include the error and code in your question. - Shafik Yaghmour
Please put code and error inside your question and don't try to force them following external links (many people here wouldn't do that anyway). - πάντα ῥεῖ

1 Answers

2
votes

Your code contains usage of a macro definition (SIMMDLENVv01_EXPORT) that isn't part of EA's standard macro definitions (there's whole a lot of them covering ATL and MFC mostly). You'll need to add additional ones under 'Settings->Language Macros' (as the hint in the error message suggests).

NOTE
Use the syntax MACRO() when declaring macros that were #defined to receive any number of arguments.

If you're trying to reverse engineer framework libraries like Qt or alike, you'll need to set many of these that you're able to reverse engineer the code without getting errors. May be you should think of a different strategy to reference these types and classes in your model then.
Another workaround might be to solely preprocess all the code you want to import first, and import from the preprocessed results.