How do I add a static library target that compiles before an application compiles in Xcode?

Posted by Koning Baard XIV on Stack Overflow See other posts from Stack Overflow or by Koning Baard XIV
Published on 2010-04-25T12:07:51Z Indexed on 2010/04/25 12:13 UTC
Read the original article Hit count: 335

Filed under:
|
|

I'm creating a static library in C++. The static library itself links to nothing. To test the static library, I'm creating a test program in C++ (you know, with a main function). Now, I want that whenever I click Build in Xcode, it compiles the static library first, then compiles the test program and link that test program to the static library, like this:

# The steps indicate the order Xcode should compile it #
(Step 1) Static Library <----------.
                                   |
                         (Step 2) Test Program -------> Standard Library

Also, the test program should use the header files of the static library.

Can anyone explain me how to configure this in Xcode? Thanks

© Stack Overflow or respective owner

Related posts about xcode

Related posts about compiling