从 xcode3.2 升级到 xcode4.3.2 后的 Builderror

Posted

技术标签:

【中文标题】从 xcode3.2 升级到 xcode4.3.2 后的 Builderror【英文标题】:Builderror after upgrading to xcode4.3.2 from xcode3.2 【发布时间】:2012-05-05 07:42:19 【问题描述】:

我们最近将 xcode 升级到了 4.3。 我正在进行测试,我需要复制目标文件并集成 FoneMonkey 文件并执行目标。 我对原始目标进行了以下更改以使其成功执行:

updated framework serch paths

"$(DEVELOPER_FRAMEWORKS_DIR)"
"$(SRCROOT)/../../Developer/Library/Frameworks"
"$(SRCROOT)"

updated Library search paths

"$(DEVELOPER_FRAMEWORKS_DIR)"
"$(SRCROOT)/../../Developer/Library/Frameworks"
"$(SRCROOT)"
"/users/ezprintsqa/FoneMonkey/lib"

executed below command 
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

现在构建成功执行。 但是添加了 Fonemonkey 文件的重复目标会出现以下错误:

Ld "/Users/ezprintsqa/Library/Developer/Xcode/DerivedData/SnapCards-dtjqrhfvqueyhrbbgjgydberyqdm/Build/Products/Debug-iphonesimulator/SnapCards copy.app/SnapCards copy" normal i386
    cd /Users/ezprintsqa/Documents/snapcards
    setenv MACOSX_DEPLOYMENT_TARGET 10.6
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/ezprintsqa/Library/Developer/Xcode/DerivedData/SnapCards-dtjqrhfvqueyhrbbgjgydberyqdm/Build/Products/Debug-iphonesimulator -L/Applications/Xcode.app/Contents/Developer/Library/Frameworks -L/Applications/Xcode.app/Contents/Developer/Library/Frameworks/CPlusTest.framework -L/Applications/Xcode.app/Contents/Developer/Library/Frameworks/DTPerformanceSession.framework -L/Applications/Xcode.app/Contents/Developer/Library/Frameworks/InterfaceBuilderKit.framework -L/
.
.

ld: warning: directory not found for option '-L/Users/ezprintsqa/Documents/snapcards/../../Developer/Library/Frameworks'
ld: warning: directory not found for option '-F/Users/ezprintsqa/Documents/snapcards/../../Developer/Library/Frameworks'
Undefined symbols for architecture i386:
  "_SCNetworkReachabilitySetCallback", referenced from:
      -[Reachability startNotifier] in Reachability.o
  "_SCNetworkReachabilityScheduleWithRunLoop", referenced from:
      -[Reachability startNotifier] in Reachability.o
  "_SCNetworkReachabilityUnscheduleFromRunLoop", referenced from:
      -[Reachability stopNotifier] in Reachability.o
  "_SCNetworkReachabilityCreateWithName", referenced from:
      +[Reachability reachabilityWithHostName:] in Reachability.o
  "_SCNetworkReachabilityCreateWithAddress", referenced from:
      +[Reachability reachabilityWithAddress:] in Reachability.o
  "_SCNetworkReachabilityGetFlags", referenced from:
      -[Reachability currentReachabilityStatus] in Reachability.o
      -[Reachability isReachable] in Reachability.o
      -[Reachability isConnectionRequired] in Reachability.o
      -[Reachability isConnectionOnDemand] in Reachability.o
      -[Reachability isInterventionRequired] in Reachability.o
      -[Reachability isReachableViaWWAN] in Reachability.o
      -[Reachability isReachableViaWiFi] in Reachability.o
      ...
  "_OBJC_CLASS_$_SenTestSuite", referenced from:
      objc-class-ref in libFoneMonkeyOCUnit.5.5b.a(FoneMonkey+OCUnit.o)
  "_OBJC_CLASS_$_SenTestObserver", referenced from:
      objc-class-ref in libFoneMonkeyOCUnit.5.5b.a(FoneMonkey+OCUnit.o)
  "_OBJC_CLASS_$_SenTestLog", referenced from:
      objc-class-ref in libFoneMonkeyOCUnit.5.5b.a(FoneMonkey+OCUnit.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

有人可以帮我解决以下问题吗:

    升级到 4.3 后文件夹 /Users/ezprintsqa/Library/Developer/ 现在不可用,但是这里正在配置此路径(我该如何更改)? _objc_class 问题。

提前致谢。

【问题讨论】:

【参考方案1】:

通过从 Xcode 中删除 SenTesting.framework,问题得到解决。

【讨论】:

以上是关于从 xcode3.2 升级到 xcode4.3.2 后的 Builderror的主要内容,如果未能解决你的问题,请参考以下文章

升级到 Xcode 3.2 后缺少框架

升级到 Xcode 3.2.5 后“缺少基本 SDK”

将 Xcode 3.2.4 升级到 3.2.5。先卸载?

如何使用 xcode-select 选择 XCode 3.2.6?

XCode 3.2.4 升级后进行逻辑测试的问题

在 Mountain Lion 上卸载 Xcode 3.2 的问题