• 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: xcode 1.5 preprocessor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xcode 1.5 preprocessor


  • Subject: Re: xcode 1.5 preprocessor
  • From: Fritz Anderson <email@hidden>
  • Date: Fri, 10 Sep 2004 15:14:19 -0500

Mnph. Illuminating. I have no ideas except for further avenues for investigation...

Is __unix the only symbol defined in Preprocessor Macros? If not, are the symbols delimited only by spaces?

What happens if you blank-out Preprocessor Macros and re-enter __unix? (You've probably done this.)

Examine the build log (force a rebuild and then open the middle split pane of the "Build -> Detailed Build Results" window) and see if -D __unix appears in the compiler invocations. (I understand it's broken, I want to know _where_.)

Have you accidentally overridden Preprocessor Macros in the current build style (is the entry bold in the build-style listing, or crossed-out in the target Build settings)? Accidentally setting it, repenting, and blanking-out the field can result in overriding the setting to blank, rather than removing the setting from the build style. You have to press the "-" button to remove the set-to-blank override (which is a disturbing button to use for the purpose, but I admit having no better idea).

	-- F

On 10 Sep 2004, at 2:32 PM, Bret Kurth wrote:

In the Target build options there is a settings line item called "Preprocessor Macros". The value is a text field where I had entered "__unix". I know this was being automagically defined before as preprocessor conditional code in a header file for different platforms was correctly defined based off the state of my macro. Simply updating the project to xcode 1.5 caused the preprocessor conditional code to be defined incorrectly because "__unix" no longer gets defined. i.e:

#ifdef __unix
#define DLLOPT
#else
#define DLLOPT __declspec(dllexport) (something that wont naturally compile on a mac)
#endif


class DLLOPT	foo {
	public:
}

Again this worked using XCode 1.2. Note I did not change versions of GCC. When the compiler hits the class definition of foo, it sees the __declspec(dllexport) garbage in front of the class name implying that "__unix" is not defined for the scope that file and subsequently chokes.

 --
Fritz Anderson
Consulting Programmer				Chicago, Illinois
http://resume.manoverboard.org/
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: xcode 1.5 preprocessor
      • From: Bret Kurth <email@hidden>
References: 
 >xcode 1.5 preprocessor (From: Bret Kurth <email@hidden>)
 >Re: xcode 1.5 preprocessor (From: Fritz Anderson <email@hidden>)
 >Re: xcode 1.5 preprocessor (From: Bret Kurth <email@hidden>)

  • Prev by Date: Re: xcode 1.5 preprocessor
  • Next by Date: Re: xcode 1.5 preprocessor
  • Previous by thread: Re: xcode 1.5 preprocessor
  • Next by thread: Re: xcode 1.5 preprocessor
  • Index(es):
    • Date
    • Thread