Re: Working-around a Symbol Conflict
Re: Working-around a Symbol Conflict
- Subject: Re: Working-around a Symbol Conflict
- From: Ken Thomases <email@hidden>
- Date: Fri, 26 Sep 2008 16:07:28 -0500
On Sep 26, 2008, at 12:12 PM, Jonathan 'Wolf' Rentzsch wrote:
I'm integrating an open-source code base (discount
http://www.pell.portland.or.us/~orc/Code/markdown/) into my Cocoa
app and
have run into a snag.
discount declares a `Line` type which conflicts with the QuickDraw
type of
the same name (even though I'm targeting 10.5 only and not
explicitly using
QuickDraw).
Here's the error:
In file included from
/Users/wolf/code/trac/cocoa/MarkdownLive/MyDocument.m:3:
/Users/wolf/code/trac/cocoa/MarkdownLive/discount-1.2.10/markdown.h:
25:
error: 'Line' redeclared as different kind of symbol
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/
ApplicationServices.framework/Frameworks/QD.framework/Headers/
QuickdrawAPI.h:782:
error: previous declaration of 'Line' was here
Anyone have any suggestions to work-around this type conflict? I'd
really
rather not modify the discount source directly. I probably could do a
project-wide `#define Line discountLine`, but I bet there's a less-
hacky
solution.
I've seen the opposite done.
#define Line QDLine
#import <ApplicationServices/ApplicationServices.h>
#undef Line
If you can figure out what's including the QuickDraw headers and why,
you might be able to short-circuit that. For example, #define the
guard macro that prevents double-inclusion of the QuickDraw header
(s). This only works if the QuickDraw headers were being included
incidentally rather than really being needed by the framework's other
headers.
Cheers,
Ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden