Upgrading to xcode 4 error No architectures to compile for
I am getting an error after upgrading to xcode 4, for all of the library projects that my application depends on.
[BEROR]No archi开发者_Go百科tectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=i386, VALID_ARCHS=armv6).
It looks like all you have to do is add i386 to the Valid Architectures in the build settings. I was compiling for the simulator, and that's why it was complaining.
This seems odd, because the project worked just fine before upgrade. It looks to me like you have to do this for any project you upgrade. At least that will work for now.
See https://devforums.apple.com/message/376732#376732
"No architectures to compile for" means "Valid Architectures" field is empty. Update it to
$(ARCHS_STANDARD_32_BIT)
and you'll see the usual armv6 armv7. This happens sometimes in XCode 4 GM after updating "Base SDK" to "Latest SDK".
Open project.pbxproj (show package content of xcodeproj file), remove all lines with VALID_ARCHS = "...";
, and restart Xcode.
Very strange. I encountered the same error and both the Debug and Release "Valid Architectures" were set to armv6 and armv7. (The same code compiles fine in Xcode 3.2.) I ended up deleting both settings, then expressly setting them to $(ARCHS_STANDARD_32_BIT) ... which in turn translates to armv6 and armv7 again ... and it compiles just fine now. No i386 needed. Hmm ...
If this error occures in combination with Phonegap the solution is:
Add "i386" in the build settings to the "Valid Architectures": for your project and the library (PhoneGapLib.xcodeProj). In both cases for the project and the target.
I was getting this error when I was trying to convert to automatic reference counting in the latest Xcode. I fixed it by adding "x86_64" to the valid architecture list, which allowed me to continue building.
Just in case someone else was having the same issue, thought I'd throw in what worked for me!
Had similar issues with xcode6 it seems to pop when upgrading xcode, tried all of what is suggested with no success what worked for me was in the new xcode created a simple new app(tabbed) and made sure my App had the same settings for architectures
Open a new project and compile in Xcode 4 and then compare build settings with converted project. That's how I found it.
精彩评论