Referenced projects and their targets/executables
-
I'm trying to have the executable from one of my projects (Project 1
from here on for simplicity) copied into the Resources folder of
Project 2 when the Project 1 is built. I added Project 1 as a
reference, set up its target as a dependency, and added the executable
to the Copy Bundle Resources build phase of Project 2. The dependency
part works just fine, but when it gets to the Copy Bundle Resources
phase, it fails with this error:
pbxcp: MyApp.app: No such file or directory
When I right-click on the executable in the Copy Bundle Resources
Phase and Show in Finder, the correct executable is shown, in Project
1/build/Release/. However, it appears that it's looking in the Project
2/build/Release folder for copying to the resources folder for some
reason. If I copy the executable from Project 1/build/Release into
Project 2/build/Release, the build succeeds and the application is put
inside the newly built bundle. Why would this happen? How can I fix
it? Thank you. -
Xcode-users would probably be a better venue for this question than Cocoa-dev, since it doesn't have anything to do with Cocoa.
Cheers,
Chuck
----- Original Message ----
From: Jacob Bandes-Storch <jtbandes...>
To: <cocoa-dev...>
Sent: Tuesday, November 27, 2007 9:37:21 PM
Subject: Referenced projects and their targets/executables
I'm trying to have the executable from one of my projects (Project 1
from here on for simplicity) copied into the Resources folder of
Project 2 when the Project 1 is built. I added Project 1 as a
reference, set up its target as a dependency, and added the executable
to the Copy Bundle Resources build phase of Project 2. The dependency
part works just fine, but when it gets to the Copy Bundle Resources
phase, it fails with this error:
pbxcp: MyApp.app: No such file or directory
When I right-click on the executable in the Copy Bundle Resources
Phase and Show in Finder, the correct executable is shown, in Project
1/build/Release/. However, it appears that it's looking in the Project
2/build/Release folder for copying to the resources folder for some
reason. If I copy the executable from Project 1/build/Release into
Project 2/build/Release, the build succeeds and the application is put
inside the newly built bundle. Why would this happen? How can I fix
it? Thank you.
____________________________________________________________________________________
Be a better pen pal.
Text or chat with friends inside Yahoo! Mail. See how. http://overview.mail.yahoo.com/ -
On Nov 27, 2007, at 9:37 PM, Jacob Bandes-Storch wrote:
> I'm trying to have the executable from one of my projects (Project 1
> from here on for simplicity) copied into the Resources folder of
> Project 2 when the Project 1 is built.
This is an Xcode question, not a Cocoa question, and therefore belongs
on the xcode-users list. Thanks.
> I added Project 1 as a reference, set up its target as a dependency,
> and added the executable to the Copy Bundle Resources build phase of
> Project 2. The dependency part works just fine, but when it gets to
> the Copy Bundle Resources phase, it fails with this error:
>
> pbxcp: MyApp.app: No such file or directory
>
> When I right-click on the executable in the Copy Bundle Resources
> Phase and Show in Finder, the correct executable is shown, in
> Project 1/build/Release/. However, it appears that it's looking in
> the Project 2/build/Release folder for copying to the resources
> folder for some reason. If I copy the executable from Project 1/
> build/Release into Project 2/build/Release, the build succeeds and
> the application is put inside the newly built bundle. Why would this
> happen? How can I fix it? Thank you.
Unfortunately, this isn't something you can fix. Xcode keeps the two
projects distinct even though they have a dependency between them, so
everything done in Project 1 is done strictly in the context of
Project 1, and everything done in Project 2 is done strictly in the
context of Project 2. The only two pieces of information shared
between them are the fact that a dependency exists, and the name of
the configuration being built.
-- Chris


