How do you get implicit dependencies to work with workspaces in Xcode 4?

前端 未结 6 2060
太阳男子
太阳男子 2020-12-02 13:36

I want to manage projects in workspaces using Xcode 4 with Cocoa Touch Static Library projects which contain shared code that I could reference from other projects. Accordin

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-02 14:09

    Another option is to just include the root of each "subproject" as a recursive header path. For example if you have AcmeLib, you can go to the main project's build options and add the path to AcmeLib to the User Header Search Path, with the recursive option enabled. Then your AcmeLib's header files will be automatically searched.

    To maintain path independence between developers you can make the path relative to an source directory variable, say $ACME_LIB, which each developer can device in the XCode preferences "Sources" pane.

    So to use AcmeLib in a new project, just drag in the project, add $ACME_LIB to the header search path, and you are good to go. XCode's implicit linking should hook up the dependencies.

提交回复
热议问题