Re: including .h files in a project with two static library targets
Re: including .h files in a project with two static library targets
- Subject: Re: including .h files in a project with two static library targets
- From: Roland King <email@hidden>
- Date: Thu, 29 Nov 2012 06:41:58 +0800
On 29 Nov, 2012, at 12:13 AM, Matt Neuburg <email@hidden> wrote:
> On Fri, 16 Nov 2012 23:00:44 +0800, Roland King <email@hidden> said:
>> I had the original mail the wrong way around, I can build an OS X static library, when I add the same files to an iOS one I cannot select the headers as members of the build product. I've deleted all the build products, rebooted, tried two different Xcode versions, different project names. If I add the .h files on an OSX project they can be selected, if I add the exact same files on iOS, asking for them to be copied .. they cannot be selected as part of the target.
>
> But surely you shouldn't need to make *any* header files part of the target. They don't need to be copied to the built app; they just need to be seen during compilation, and that has nothing to do with target membership - it has to do with where you've told a target to look for header files. m.
Yes you do, if you make proper standalone static libraries at least, libraries you could ship. You want the public headers in the build product, public only, and you want to point at that in your app compilation. Mine are in /usr/local/include/something. That's how Xcode sets up the app compile, basically, it uses the built product of the static library as if it were installed.
Anyway the issue was the iOS target template had a copy files final stage instead of an install headers final stage like the OS X one has and like the ios one used to have. Adding the correct final step reenabled the public/private/package selection and it all works fine again. Whether that's a bug or done on purpose I have no idea, but there is a longstanding bug with header copies in archived builds which keeps tripping people up, so instead of fixing it they may have changed the template, which would be a bit naughty.
I'll file and see what comes back.
_______________________________________________
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