【问题标题】:Why does this debug build reference a release library?为什么这个调试版本引用了一个发布库?
【发布时间】:2011-03-14 03:21:13
【问题描述】:

我刚刚安装了 Xcode 4,但在我的项目中遇到了这个错误:

ld: warning: directory not found for option '-LDebug-iphonesimulator4.3'
ld: warning: ignoring file /Developer/Projects/BuildOutput/Release-iphoneos/libMyFramework.a, missing required architecture i386 in file
Undefined symbols for architecture i386: 
"_OBJC_CLASS_$_MyRandomNumber", referenced from:
objc-class-ref in myAppDelegate.o 
objc-class-ref in RootViewController.o

我将项目设置为 iOS 4.3 模拟器。我确实检查了该方案,并将其设置为调试构建配置。为什么会引用上述库的 Release 版本?

另外,i386 错误是关于什么的?

【问题讨论】:

    标签: iphone objective-c ios4 xcode4


    【解决方案1】:

    我也看到了这种类型的错误。奇怪的是,我一直在模拟器下成功地构建、链接和运行。我刚刚尝试在我的 iPhone 上启动我的应用程序,并且在链接过程中完全崩溃了。

    我之前在 iPhone 上运行过我的应用程序。去年我一直在 Xcode 3.2.x 下构建它,从未见过这个问题。

    其他几个 SO 线程表明这可能是由于将框架复制到项目文件夹中,而应该只是“移动框架”。好的。在哪里,以及如何让 Xcode 知道它在哪里?如果这不是问题,那是什么?

    Xcode 4 有很多承诺,但有时会让人头疼....

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-04-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多