Re: One Project in a Workspace Can't Find a Header in the other Project
Re: One Project in a Workspace Can't Find a Header in the other Project
- Subject: Re: One Project in a Workspace Can't Find a Header in the other Project
- From: Roland King <email@hidden>
- Date: Sat, 02 Feb 2013 09:47:21 +0800
On 2 Feb, 2013, at 9:35 AM, Graeme Costin < email@hidden> wrote: I am moving two projects from Xcode 3.2.6 to an Xcode 4.5.2 Workspace. One project builds a static library, the other builds an app that links with the static library. But building the app needs access to many of the headers that go into building the library.
How do I set things up so that building the app can get at the headers in the library project? None of the Xcode documentation I have found tells me the details - it just gives hints that all files in any one of the projects is available to the other projects in the Workspace, but so far that hasn't worked for me.
Graeme
I do this a lot. In the static library project I mark all the headers I want to export as 'public' (it's in the file properties) and then I have this line in my .xcconfig file, which I add to all my new projects
HEADER_SEARCH_PATHS = "$(BUILT_PRODUCTS_DIR)/usr/local/include";
You can also just set that on the build properties in the 'Header Search Paths' slot.
Add the static library xcodeproj to your project and it will become a sub-project, I've never gotten very far with workspaces, add it to Target Dependencies in the Build Phases of your target and finally to Link Binary With Items. The build will build your library, dump the headers in the BUILD_PRODUCTS_DIR and the build of your target will find them and the .a and build.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden