Search code examples
iosxcodebuild

Xcodebuild: library not found for subproject


I've been fighting with this one for a while and i've finally brought myself to asking the question.

In Xcode4 I have a project with a Subproject, and the subproject has a series of products that are made that the top level project needs to run.

When compiling the project using the build, run, achieve or anything using xcode4, the code runs fine and is built correctly.

However, when using xcodebuild my build fails, I have been able to get the subproject to build by adding the targets to the top level project's target dependencies, hower i get the following error:

ld: library not found for -lsubproject

Has anyone run into this before? thank you.


Solution

  • Basically this was fixed by converting my project to use workspaces and setting up various header search settings and configuring the same build directories for each workspace.