Can't Build for iPhone Device
After upgrading to the iPhone SDK 4.0, I get the following error when building for devic开发者_StackOverflow社区e:
gcc-4.0: Invalid arch name : armv7
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.0 failed with exit code 1
Before, I was only building for armv6 (the default on pre 4.0 SDK's).
While I had GCC 4.2 selected in my project settings, it was still using 4.0. By switching to 4.0 and then back, I was able to compile with 4.2.
I had the same problem. Switching to 4.0 and back didn't work for me. I got it to work by closing the project, doing "Show Package Contents" on the project, and then editing the project.pbxproj in TextEdit. Do a search for GCC_VERSION, I found a couple entries still using 4.0 instead of 4.2. Changing them manually worked. (Stupid XCode. It has lots of bugs like this.)
精彩评论