• 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: how to ensure #defines apply to all files in project?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to ensure #defines apply to all files in project?


  • Subject: Re: how to ensure #defines apply to all files in project?
  • From: "Ken G. Brown" <email@hidden>
  • Date: Mon, 12 May 2008 11:38:16 -0600

At 10:13 AM -0700 5/12/08, email@hidden apparently wrote:
>Date: Mon, 12 May 2008 00:41:21 -0400
>From: Brian Stern <email@hidden>
>Subject: Re: how to ensure #defines apply to all files in project?
>To: Xcode-users Users <email@hidden>
>Message-ID: <email@hidden>
>Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
>
>
>On May 11, 2008, at 8:41 PM, Ken G. Brown wrote:
>
>> I am attempting to compile an open source project in which a
>> config.h file sets up a bunch of #defines that control whether or
>> not other .c files in the project include certain files.
>>
>> eg.
>>
>> In one of the .c files
>>
>> #ifdef HAVE_CONFIG_H
>> #include "config.h"
>> #endif
>>
>>
>> I have defined HAVE_CONFIG_H 1 as a user defined build setting for
>> all configurations but it does not get seen in the .c file.
>> I have put a #warning "message" in the #ifdef and it does not get hit.
>>
>
>Use the 'Preprocessor Macros' build setting.  Type in something like:
>
>HAVE_CONFIG_H=1
>
>This will correspond to -DHAVE_CONFIG_H=1 on the command line.

Just putting HAVE_CONFIG_H=1 by itself on the Preprocessor Macros line results in the following errors:

<command line>:1:2: error: no macro name given in #define directive
<command line>:1:1: error: macro names must be identifiers

Thx,
Ken G. Brown
 _______________________________________________
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: how to ensure #defines apply to all files in project?
      • From: Brian Stern <email@hidden>
  • Prev by Date: Re: how to ensure #defines apply to all files in project?
  • Next by Date: Re: Conditional dependencies (and linked libraries) in a Xcode project?
  • Previous by thread: Re: how to ensure #defines apply to all files in project?
  • Next by thread: Re: how to ensure #defines apply to all files in project?
  • Index(es):
    • Date
    • Thread