Xcode 4: How to Add Static Library Target Dependency to Project

前端 未结 1 464
青春惊慌失措
青春惊慌失措 2020-12-25 15:13

I know, this has been asked a few times, but mostly for Xcode 3.x. For the iPad, I have two projects both living in a common workspace

  • Foo, a view-based applic
相关标签:
1条回答
  • 2020-12-25 15:26

    In general Xcode 4 seems to discover the dependencies automatically as the Edit Scheme sheet implies. Other developers have mentioned that the dependencies are not automatically discovered and require explicitly listing them:

    So, Edit Scheme -> Build -> add targets from your workspace.

    As far as the static library header files go, Xcode 4 seems to have a problem, at least with code completion and syntax highlighting. The only way I can get either to work properly with classes in static libraries to to drag a copy of the header files in question to a location into a group folder in the main project. Note that you should uncheck Add to Target... That takes care of the syntax highlighting and code completion. The rest should be handled by giving it the proper header search path. That would be User Header Search Paths = $(BUILT_PRODUCTS_DIR) - depending on how you set up your locations preferences.

    See: this link

    0 讨论(0)
提交回复
热议问题