• 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
Seeking Preprocessor macro clarification
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Seeking Preprocessor macro clarification


  • Subject: Seeking Preprocessor macro clarification
  • From: Michael McLaughlin <email@hidden>
  • Date: Tue, 07 Aug 2007 16:17:35 -0400
  • Thread-topic: Seeking Preprocessor macro clarification

I am an Xcode newbie, having spent >10 years with CodeWarrior.  I am
"practicing" Xcode by trying to port an open-source project: SFMT.

http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/

This code has several #defines to trigger conditional compilation blocks,
e.g. For Altivec vs. SSE2.

In target scope (Deployment), I set one such macro, HAVE_ALTIVEC=1, but it
does not show up in Project Symbols as I had expected, nor is its effect
apparent in Xcode prior to compilation.

If I #define this symbol in the top-level header, then it does show up in
Project Symbols and it does seem to trigger the necessary changes, e.g. from

#if defined(HAVE_ALTIVEC)
  #if !defined(__APPLE__)
    #include <altivec.h>
  #endif
/** 128-bit data structure */
union W128_T {
    vector unsigned int s;
    uint32_t u[4];
};
/** 128-bit data type */
typedef union W128_T w128_t;

#elif defined(HAVE_SSE2)
...

Should I expect see such conditional definitions in Xcode or is the latter
oblivious to anything not given in a header (such as -DHAVE_ALTIVEC=1)?  I
observe, in the Build log, that the macro is sent to the compiler but
debugging is more difficult when conditional definitions are ambiguous.

--
Mike McLaughlin

 _______________________________________________
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

  • Follow-Ups:
    • Re: Seeking Preprocessor macro clarification
      • From: Chris Espinosa <email@hidden>
  • Prev by Date: Re: Xcode-users Digest, Vol 4, Issue 381
  • Next by Date: Re: How packages are recognized...
  • Previous by thread: Re: Xcode-users Digest, Vol 4, Issue 381
  • Next by thread: Re: Seeking Preprocessor macro clarification
  • Index(es):
    • Date
    • Thread