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

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


  • Subject: how to ensure #defines apply to all files in project?
  • From: "Ken G. Brown" <email@hidden>
  • Date: Sun, 11 May 2008 18:41:10 -0600

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.

How do you ensure #defines are valid for all the files in a project?

I've tried including the config.h in main but it does not get included in some files because of the above #ifdef not working, and that causes other issues by the defines in the config.h not getting into the .c code.

Thx for any tips.
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>
    • Re: how to ensure #defines apply to all files in project?
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: DYLIB/LIB/FRAMEWORKS for iPhone ?
  • Next by Date: Re: how to ensure #defines apply to all files in project?
  • Previous by thread: Re: DYLIB/LIB/FRAMEWORKS for iPhone ?
  • Next by thread: Re: how to ensure #defines apply to all files in project?
  • Index(es):
    • Date
    • Thread