Re: passing info from main project to subproject
Re: passing info from main project to subproject
- Subject: Re: passing info from main project to subproject
- From: "Peter Lau" <email@hidden>
- Date: Tue, 22 May 2007 12:01:19 -0400
I tried to search in the doc, the list, and the web without much luck
so I thought I would post the question here:
Here are the settings: I have two Xcode projects TheLib and TheApp.
TheLib.xcodeproj generates libTheLib.a. TheLib.xcodeproj has two
build config "Debug" and "Release", stock from the template project.
TheLib.xcodeproj has two files: TheLib.h and TheLib.c.
TheApp.xcodeproj uses libTheLib.a. So, I included TheLib.xcodeproj as
a subproject and set up the dependency. All works fine.
Now am expanding the content in TheLib.c.
I have a #define in TheLib.h and I block the new contents in TheLib.c,
something like:
#ifndef MORE_CONTENTS
#define MORE_CONTENTS 0
#endif
#if MORE_CONTENTS
void new_call()
{...}
#endif
What I was thinking is set the value of MORE_CONTENTS in
TheApp.xcodeproj and pass in the value to TheLib.xcodeproj. So, I put
"#define MORE_CONTENTS 1" in the pch file for TheApp.xcodeproj, do a
"Clean All Targets", then Build. However, the value does not seem to
get pass when compile TheLib.xcodeproj 'cos I got a link error that
new_call() does not exist (which is the intentional default setup for
TheLib).
My question is, can I pass #define value from main project to
subprojects without adding a new pair of DebugWithNewContents and
ReleaseWithNewContents in both TheApp.xcodeproj and TheLib.xcodeproj?
Thanks.
pete
_______________________________________________
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