Book a Demo

Author Topic: Problem with Importing Classes  (Read 5549 times)

tomjscott

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Problem with Importing Classes
« on: July 20, 2005, 05:58:22 pm »
I am trying out the 30 day trial version of Enterprise Architect and I'm having a problem with importing an existing source directory for C++.  My source code is a Windows DLL and all classes contain the standard dllexport.

For example, in the main DLL file, the following is declared:

#define OMEGACORE_API __declspec( dllexport )

Then in all the classes that I want to be visible to external users of my DLL, the class is declared as follows:

class OMEGACORE_API MyClass
{
};

The problem is that when the classes are imported, EA thinks every class has the name OMEGACORE_API (i.e. instead of MyClass in my above example).

Is there a way around this issue?


colingr

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • that's not a bug, it's a feature...
    • View Profile
Re: Problem with Importing Classes
« Reply #1 on: July 20, 2005, 06:55:16 pm »
I think you can get around this by selecting "language macros" from the configuration menu, then adding your
OMEGACORE_API macro. That should work

tomjscott

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Problem with Importing Classes
« Reply #2 on: July 20, 2005, 08:02:58 pm »
Thanks.  That worked great.