David Beck
David Beck

Reputation: 10159

Can't Build for iPhone Device

After upgrading to the iPhone SDK 4.0, I get the following error when building for device:

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).

Upvotes: 1

Views: 994

Answers (2)

Vern Jensen
Vern Jensen

Reputation: 3550

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.)

Upvotes: 0

David Beck
David Beck

Reputation: 10159

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.

Upvotes: 1

Related Questions