2014-10-19 28 views
5

我不知道我是如何得到這麼多錯誤的。我更新了我的Mac到Yosemite,更新了我的可可做了一個pod安裝。爲體系結構i386定義了符號:更新Yosemit和Pod之後安裝

我感覺不好因爲有很多類似的問題,但我找不到任何看起來相關的東西。我試圖更新可可豆莢重新安裝。刪除pod文件並做一個pod init,檢查我的架構,它具有armvs6,armvs7標準架構。我真的很困惑。

defined symbols for architecture i386: 
    "_OBJC_CLASS_$_AFHTTPRequestOperation", referenced from: 
     objc-class-ref in LoginController.o 
    "_OBJC_CLASS_$_AFHTTPRequestOperationManager", referenced from: 
     objc-class-ref in ChatController.o 
     objc-class-ref in TutorSessionViewController.o 
     objc-class-ref in StudentSessionManager.o 
     objc-class-ref in TutorSessionManager.o 
     objc-class-ref in Device.o 
     objc-class-ref in RequestHandler.o 
     objc-class-ref in TutorMapController.o 
     ... 
    "_OBJC_CLASS_$_AFJSONRequestSerializer", referenced from: 
     objc-class-ref in ChatController.o 
     objc-class-ref in TutorSessionViewController.o 
     objc-class-ref in StudentSessionManager.o 
     objc-class-ref in TutorSessionManager.o 
     objc-class-ref in Device.o 
     objc-class-ref in RequestHandler.o 
     objc-class-ref in TutorMapController.o 
     ... 
    "_OBJC_CLASS_$_AMTagView", referenced from: 
     objc-class-ref in ProfileController.o 
    "_OBJC_CLASS_$_APNavigationController", referenced from: 
     objc-class-ref in StudentSessionManager.o 
     objc-class-ref in TutorSessionManager.o 
    "_OBJC_CLASS_$_FUIButton", referenced from: 
     _OBJC_CLASS_$_GreenButton in GreenButton.o 
     _OBJC_CLASS_$_RedButton in RedButton.o 
    "_OBJC_CLASS_$_JSBubbleImageViewFactory", referenced from: 
     objc-class-ref in ChatController.o 
    "_OBJC_CLASS_$_JSBubbleView", referenced from: 
     objc-class-ref in ChatController.o 
    "_OBJC_CLASS_$_JSMessage", referenced from: 
     _OBJC_CLASS_$_TreeMessage in Treemessage.o 
    "_OBJC_CLASS_$_JSMessagesViewController", referenced from: 
     _OBJC_CLASS_$_ChatController in ChatController.o 
    "_OBJC_CLASS_$_NZCircularImageView", referenced from: 
     objc-class-ref in ChatController.o 
    "_OBJC_CLASS_$_PKImagePickerViewController", referenced from: 
     objc-class-ref in SignUpPhotoTableViewCell.o 
    "_OBJC_CLASS_$_RATreeView", referenced from: 
     objc-class-ref in SubjectViewController.o 
    "_OBJC_CLASS_$_RNBlurModalView", referenced from: 
     objc-class-ref in TutorOptions.o 
     objc-class-ref in ChatController.o 
     objc-class-ref in CHTumblrMenuView.o 
     objc-class-ref in SubjectAddViewController.o 
    "_OBJC_CLASS_$_SDImageCache", referenced from: 
     objc-class-ref in ProfileSetting.o 
     objc-class-ref in JAAppDelegate.o 
    "_OBJC_CLASS_$_SRHubConnection", referenced from: 
     objc-class-ref in JAAppDelegate.o 
    "_OBJC_CLASS_$_SVProgressHUD", referenced from: 
     objc-class-ref in TutorOptions.o 
     objc-class-ref in ChatController.o 
     objc-class-ref in JALeftViewController.o 
     objc-class-ref in UserProfileView.o 
     objc-class-ref in RequestHandler.o 
     objc-class-ref in TimerSessionController.o 
     objc-class-ref in SplashViewController.o 
     ... 
    "_OBJC_CLASS_$_TWMessageBarManager", referenced from: 
     objc-class-ref in MessangeHandler.o 
    "_OBJC_METACLASS_$_FUIButton", referenced from: 
     _OBJC_METACLASS_$_GreenButton in GreenButton.o 
     _OBJC_METACLASS_$_RedButton in RedButton.o 
    "_OBJC_METACLASS_$_JSMessage", referenced from: 
     _OBJC_METACLASS_$_TreeMessage in Treemessage.o 
    "_OBJC_METACLASS_$_JSMessagesViewController", referenced from: 
     _OBJC_METACLASS_$_ChatController in ChatController.o 
ld: symbol(s) not found for architecture i386 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

這裏是我的Podfile

source 'https://github.com/CocoaPods/Specs.git' 

target 'StudyTree' do 

pod 'JSMessagesViewController' 
pod 'XHRealTimeBlur' 
pod 'PKImagePicker', '~> 0.0.3' 
pod 'SVProgressHUD', :head 
pod 'RMStepsController', '~> 1.0.1' 
pod 'TWMessageBarManager', '~> 1.7.0' 
pod 'TTCounterLabel' 
pod 'RATreeView', '~> 0.2.2' 


pod 'AFPopupView', '~> 1.0' 
pod 'AMTagListView' 
pod 'RNBlurModalView', '~> 0.1.0' 
pod 'BPForms' 
pod 'SignalR-ObjC', :git=>'https://github.com/DyKnow/SignalR-ObjC.git', :branch => 'feature-2.0.0.beta1' 
pod 'APDropDownNavToolbar', '~> 1.1' 
pod 'FlatUIKit' 
pod 'NZCircularImageView', '~> 0.0.4' 
xcodeproj '/Users/ethankeiser/WorkSpace/test/StudyTree/StudyTree.xcodeproj' 
end 

編輯

所以我刪除了所有其它鏈接器標記,並用$取代它(繼承),我仍然得到這個。

[!] The `StudyTree [Debug]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-StudyTree/Pods-StudyTree.debug.xcconfig'. This can lead to problems with the CocoaPods installation 
    - Use the `$(inherited)` flag, or 
    - Remove the build settings from the target. 

[!] The `StudyTree [Release]` target overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Target Support Files/Pods-StudyTree/Pods-StudyTree.release.xcconfig'. This can lead to problems with the CocoaPods installation 
    - Use the `$(inherited)` flag, or 
    - Remove the build settings from the target. 

回答

23

在Build Settings中,找到「Other Linker Flags」。如果它是粗體,選擇它並按退格鍵,它應該回到其正常狀態。如果它不是固定的,刪除所有的標誌,然後刪除並重新安裝豆莢。

+0

謝謝!這解決了我的問題!我真的不知道爲什麼蘋果有時候做這件事.. – fustalol 2015-01-19 10:01:44

+0

我很驚訝這個答案! – SteBra 2015-04-24 07:27:17

1

我有一個非常類似的一系列錯誤的建設我的測試中,其使用OCHamcrest和OCMock,例如:

Undefined symbols for architecture i386: 
    "_HC_assertThatLongLongWithLocation", referenced from: 
     -[WNGLoggerTests test_convertToMetricMessage_constructs_a_proper_metric] in loggerTests.o 
    "_HC_assertThatUnsignedIntegerWithLocation", referenced from: 
     -[WNGLoggerTests test_timerCount_reports_the_correct_number_of_timers_in_progress] in loggerTests.o 
    "_OBJC_CLASS_$_OCMockObject", referenced from: 
     objc-class-ref in LoggingConnectionDelegateTests.o 
     objc-class-ref in loggerTests.o 

但解決的辦法是爲我的方案不同。

在我的調查過程中,我驗證了XCode 6.0.1命令行工具已安裝,並且它看起來沒有問題。

然而,我的解決辦法是用(重新)安裝Xcode的命令行工具:

xcode-select --install 

我發現它非常有幫助的使用完全相同的CocoaPods相同版本(0.33.1),並記我的本地環境(0.2.2)和特拉維斯(0.2)之間xctool的差異。

我相信我仍然在TravisCI上遇到https://github.com/facebook/xctool/issues/380,它仍然有https://github.com/travis-ci/travis-ci/issues/2841開放。

請注意,在從小牛升級到優勝美地之前,XCode 6中的所有內容都工作正常。

相關問題