Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[split]The reason GCC doesn't work for us
#6
Thank you for letting me muck around with the code. To me it looks like the answer should look something like the code below.

From what I have read online the com_interface attribute was originally made to get GCC to make vtables compatible with COM objects. (With my compiler ("gcc (GCC) 3.4.2 (mingw-special)") com_interface is the default.) All that would be needed is replacing com_interface with the correct class attribute, if it exists. (That's why I said the answer should look something like the code below. The mechanism is there, but not necessarily the attribute you need, although my guess is the attribute already exists.)

Code:
#if defined(__GNUC__)
# define VC_VTABLE __attribute__((com_interface))
#else
# define VC_VTABLE
#endif

class InfantryClass {
  public:
  int SelectWeapon(TechnoClass *target);
  virtual void Update();
} VC_VTABLE;
EDIT:
I'm rambling a bit right now because I have dialup (the bad kind) and it will take me some time to get wxDev-C++, the YRPP source, and a svn client and don't want to forget to check this out. Sorry about that.
Reply


Messages In This Thread
[split]The reason GCC doesn't work for us - by Guest - 22.08.2008, 03:03:19
RE: Showtime - by DCoder - 22.08.2008, 08:45:57
RE: Showtime - by DCoder - 22.08.2008, 14:19:19
RE: Showtime - by MrNybbles - 22.08.2008, 20:56:27



Users browsing this thread: 1 Guest(s)