• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Working-around a Symbol Conflict
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Working-around a Symbol Conflict (From: "Jonathan 'Wolf' Rentzsch" <email@hidden>)

  • Prev by Date: Code-gen bugs compile Boost Regex with gcc/XCode Obj-C++ (3.1).
  • Next by Date: include behavior of Xcode and gcc via comnd line differ.
  • Previous by thread: Working-around a Symbol Conflict
  • Next by thread: Re: Working-around a Symbol Conflict
  • Index(es):
    • Date
    • Thread