Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > General Discussion
  New Posts New Posts RSS Feed - Macro redefinition
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Macro redefinition

 Post Reply Post Reply
Author
Message
johnmichael View Drop Down
Groupie
Groupie


Joined: 30 June 2009
Location: United Kingdom
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote johnmichael Quote  Post ReplyReply Direct Link To This Post Topic: Macro redefinition
    Posted: 27 August 2009 at 6:15am
SAFE_DELETE and SAFE_RELEASE macros are defined by XTPMacros.h

unfortunatly these are very commonly used macro names and just about every api has them. fortunatly almost every other api wraps them in:

#if !defined SAFE_DELETE
#define SAFE_DELETE(x)
   ...
#endif

meaning you dont get these redefinition error. Although you may have specific implementations for the macro's bodies so maybe you should rename them:

XT_SAFE_DELETE
XT_SAFE_RELEASE

to avoid future conflicts while still maintaining the ability to customise the macro body.

regards

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2009 at 7:26am
Him
 
just add
#undef SAFE_DELETE
before you include toolkit.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
johnmichael View Drop Down
Groupie
Groupie


Joined: 30 June 2009
Location: United Kingdom
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote johnmichael Quote  Post ReplyReply Direct Link To This Post Posted: 27 August 2009 at 8:13am
yes I did this but its a hack not a solution. I think the real problem needs to be addressed with the toolkit.

<code>

#if !defined SAFE_DELETE

#endif

</code>

wrappers...
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 28 August 2009 at 4:05am
Hi,
 
Thanks, we will add it.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 28 August 2009 at 8:34am
I'd say the same goes for that other define you have :P (DirectShow I suppose).
PokerMemento - http://www.pokermemento.com/
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.