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: Chris Hanson <email@hidden>
- Date: Tue, 22 May 2007 13:58:06 -0700
On May 22, 2007, at 9:01 AM, Peter Lau wrote:
TheApp.xcodeproj uses libTheLib.a. So, I included TheLib.xcodeproj as
a subproject and set up the dependency. All works fine.
[...]
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?
No. Xcode does not have "sub-projects," it has "cross-project
references."
Building a project on the other end of a cross-project reference is
almost completely identical to opening it by hand, setting its active
build configuration to one with the same name as in your original
project, and clicking the build button.
Search the list for "cross-project reference" for more thorough
explanation.
For what you're trying to do, I strongly recommend that you learn how
to build a framework that you can embed in your application instead.
A framework carries its header files with it, which means that you'll
always have up-to-date headers based on what the framework itself
supports.
-- Chris
_______________________________________________
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