1

I've created a iPhone static library project with two targets like this

Project
--> Library (Device) target
--> Library (simulator) target

The device target has the SDK set to the device so it produces an armv6/7 library and the simulator target is set to the simulator SDK so it produces an i386 library.

The issue I'm having is that the SDK settings on the targets keep getting overridden by the XCode active target setting. i.e. if I build the device target, but the XCode window is showing the active SDK as being the simlulator, XCode will build a simulator library instead of a device library, ignoring the settings of the target. Although it will put it into the *-iphoneos/ directory in the build directories!

I originally had the same issue with another static library project, and after a lot of playing around got everything to work correctly. i.e. The targets ignore the XCode active SDK because they have their own specifications of what to build.

The problem is that I don't know what made it work in that project and I have not been able to reproduce the issue in it either.

Does anyone have any ideas as to what is going on?

ciao Derek

4

1 回答 1

1

好的,我想我已经想通了。

将项目 SDK 设置为常规设置,即。模拟器 SDK,以便您在编码期间获得正确的 API 和库。

将每个目标设置为它需要构建的 SKD。IE。设备 SDK 或模拟器 SDK。

将 XCodes SDK 设置为当前 SDK,有效地告诉它不要覆盖目标。

于 2010-04-15T01:04:48.523 回答