简体   繁体   中英

Determine order of building projects in Xcode 5 workspace (with dependencies between static library projects)

I am working with an Xcode workspace that combines one iOS application projects with several iOS static library projects. I've now added a further library B project that is dependent on one of its siblings A and run into a build error whereby the compiler cannot find one of A 's header files when compiling one of B 's files.

I assume this has to do with the order in which these projects are built. So I am wondering what determines the order of the different steps. How can I be sure that A 's Copy Files build phase (which copies the required header file) executes before B 's file are compiled. I can see the apparent order of source files for compilation in the target's Compile Sources build phase; is there a similar list that determines the "order" of projects inside the workspace. The project navigator view imposes one, but swapping A and B in that view does not remedy the problem.

Has any one succeeded with this kind of setup (cross-dependency between static library projects in a workspace, all compiled into a single bundle) and what was the required configuration?

In the scheme under 'Build' you can drag the targets used into a specific order. If you un-check the 'Parallelize Build' option the targets are built in the specified order. So the later ones can have dependencies to the earlier ones.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM