Re: Making a WO Project dependent on a WO Framework Project
Re: Making a WO Project dependent on a WO Framework Project
- Subject: Re: Making a WO Project dependent on a WO Framework Project
- From: Lachlan Deck <email@hidden>
- Date: Sun, 25 Mar 2007 08:37:39 +1000
Hi Michael,
late response...
On 09/03/2007, at 2:12 PM, Michael Scott wrote:
I'm having difficulty working out how to make an Xcode WO project
depend
upon a WO Framework project. Could anyone help?
I have a WO framework project and two application projects (a
survey system
and a booking system) that use the framework. Up until now, I've been
developing and deploying the framework separately from the
applications. The
applications have the deployed framework added to their list of
frameworks.
This works fine. But I'm eager to make the application projects
dependent
upon the framework project to gain the debugging advantages of
dependent
projects.
In an attempt to establish this dependency, I've done the following:
1) I've placed a reference to the framework project in the application
project using Xcode's Add to Project... menu option.
What you'd normally do is control-click on the Frameworks folder and
select Add existing framework... and make certain you only have
Application Server target selected (like for your Java files).
This added an icon
folder for the framework project into the Groups & Files of the
application
project. This icon folder contained references to the build
products of the
framework project.
Not necessary.
2) I configured Xcode to use the same build location for all
projects via
the Building tab in the Preferences window. My understanding is
that Xcode
needs this to locate all of the build products during a dependent
build.
Perhaps.
3) I did the following to create the dependency (but perhaps this
is where
I'm going wrong). A WO application has three targets: an
Application Server
target, a Web Server target, and an aggregate target named after the
project. The aggregate target has direct dependencies on the two
other
targets. I selected Get Info for the aggregate target, and in the
Direct
Dependencies list, add the framework projects aggregate target. I
then
dragged the framework's aggregate target above the the other two,
so that it
is the first dependency in the list.
When I build the application project, Xcode appears to build the
framework
without problems but produces numerous 'cannot find symbol' errors
when it
tries to compile the application. Examination of these errors
indicates
that Xcode is unable to locate the classes from the framework project.
That suggests you haven't linked the framework to the application as
mentioned above (i.e., in a similar fashion to the apple-supplied
frameworks). It needs to be not only a build-dependency but a
framework you've linked against.
I can make these errors go away by the following method, but I'm
sure it's
not the correct thing to do. In the application project, I've
dragged the
symbol for the framework's build products into the Compile Sources
build
phase of the application's Application Server target. This works
fine for
development - giving me the desired ability to debug both the
application
and framework together, but it doesn't work for deployment.
You need to do a build of your framework and then control-click in
your app to Add existing frameworks to the Application Server target.
That's what allows the symbols to be resolved on the classpath.
with regards,
--
Lachlan Deck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden