1

I'll make this as short as possible.

I'm trying to build a static library for both iOS and OS X. It would seem that the SDK (iOS/Mac OS X) to be used with the static library should be the same as the target which links against this library.

Is there any way to create a common static library that wouldn't depend on either of the SDKs particularly? Or should I just build SDK specific libraries?

One of the problems using the wrong kind of static library is that the linker throws an error related to not finding [super init] for class that inherits NSObject.

In addition, it seems that the X_Prefix.pch has different content when building desktop and iOS libraries. How should I handle this and possibly other differences between these two platforms?

mkko
  • 4,262
  • 3
  • 25
  • 29
  • Now that I foolishly believe that I'm a little smarter, this question is quite stupid. Of course the Xcode build targets must be different (and so the static libraries has to be different) and this way one can provide the specific libraries that the target will be linked against. – mkko Mar 24 '11 at 20:50

1 Answers1

0

This was answered in another SO question, I just didn't know how to find it in the first place: Build fat static library (device + simulator) using Xcode and SDK 4+

Community
  • 1
  • 1
mkko
  • 4,262
  • 3
  • 25
  • 29