简体   繁体   中英

Xcode target architecture

I have an iPhone app that I am trying to port to MacOS. To get things started, I added a MacOS target to my existing Xcode project.

The problem I am having is that when I switch from the MacOS target to the iOS target, it tries to build it with architecture i386, which leads to like a zillion compiler errors.

In my target settings for the iOS target, it shows valid architectures as armv6 and armv7.

Here is the first error:

/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/machine/types.h:37:0 /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/machine/types.h:37:24: error: i386/types.h: No such file or directory

This appears to be a bug in XCode, which is circumvented by option-clicking (ie alt-clicking) on the overview, usually top-left in the xcode window, and then selecting the right SDK. The architecture then changes to the right one (hopefully).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM