没有要编译的体系结构(ONLY_ACTIVE_ARCH = YES,活动arch = x86_64,VALID_ARCHS = armv6 armv7)

时间:2011-12-12 17:29:36

标签: objective-c xcode3.2

我有一个带有两个目标的Xcode 3.2.5项目。第一个是香草iOS目标。第二个是针对Mac的。这是项目描述:

    92936A04148FEE15001C4EC6 /* Debug */ = {
        isa = XCBuildConfiguration;
        buildSettings = {
            ADDITIONAL_SDKS = "";
            ALWAYS_SEARCH_USER_PATHS = NO;
            ARCHS = "$(NATIVE_ARCH_ACTUAL)";
            COPY_PHASE_STRIP = NO;
            GCC_DYNAMIC_NO_PIC = NO;
            GCC_ENABLE_FIX_AND_CONTINUE = YES;
            GCC_OPTIMIZATION_LEVEL = 0;
            GCC_PRECOMPILE_PREFIX_HEADER = NO;
            GCC_PREFIX_HEADER = SleepSoundCommand_Prefix.pch;
            GENERATE_PKGINFO_FILE = NO;
            INFOPLIST_FILE = "SleepSoundCommand-Info.plist";
            INSTALL_PATH = "$(HOME)/Applications";
            ONLY_ACTIVE_ARCH = YES;
            OTHER_LDFLAGS = "";
            PREBINDING = NO;
            PRIVATE_HEADERS_FOLDER_PATH = "";
            PRODUCT_NAME = SleepSoundCommand;
            PUBLIC_HEADERS_FOLDER_PATH = "";
            SDKROOT = "";
            VALID_ARCHS = "i386 ppc ppc64 ppc7400 ppc970 x86_64";
        };
        name = Debug;
    };

问题是,当我尝试构建时,我得到了

No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=armv6 armv7).

为什么坚持“VALID_ARCHS = armv6 armv7”?

1 个答案:

答案 0 :(得分:1)

  

为什么坚持“VALID_ARCHS = armv6 armv7”?

在Xcode项目中混合Mac和iOS目标一直很棘手。

我怀疑您的问题与SDK的使用有关。如果您使用的是iOS SDK并在某处定位iOS设备,则需要arm*。确保SDK设置没有泄漏到Mac目标。

另外 - 如果可能的话,你应该升级到最新的Xcode。自相对古老的3.2 ...

以来已经修复了大量的bug