2014-12-14 3 views
0

Xcode 프로젝트의 다른 링커 플래그에 '--ObjC'를 추가 할 때 어떤 이유로 링커 오류가 발생합니다. 바로 --ObjC의 부족에 의해 발생이 믿음에clang : error : 지원되지 않는 옵션 '--ObjC'

*** Assertion failure in -[AMTableView _configureCellForDisplay:forIndexPath:], /SourceCache/UIKit_Sim/UIKit-3318.16.14/UITableView.m:7344 
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:' 

가 나는 건가요 :이 플래그를 제거하면, 내 테이블보기 중 하나를로드하고 다음과 같은 오류를 얻을 수없는 무엇입니까?

그래서 내가 다시 (그 사실에 끌려 가고 - cocoapods 그것을에서 가지고 얘기하기 때문에, $ (상속))에서 플래그를 추가 할 때, 내가 링커 오류가 발생합니다 :

Ld /Users/jimmy/Library/Developer/Xcode/DerivedData/AptTin-anlnlphskgbkbydlukhsoqjapwpl/Build/Products/Debug-iphonesimulator/myapp.app/myapp normal x86_64 
    cd /Users/jimmy/Desktop/AptTin 
    export IPHONEOS_DEPLOYMENT_TARGET=8.1 
    export 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 x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -L/Users/jimmy/Library/Developer/Xcode/DerivedData/AptTin-anlnlphskgbkbydlukhsoqjapwpl/Build/Products/Debug-iphonesimulator -F/Users/jimmy/Library/Developer/Xcode/DerivedData/AptTin-anlnlphskgbkbydlukhsoqjapwpl/Build/Products/Debug-iphonesimulator -F/Users/jimmy/Desktop/AptTin -filelist /Users/jimmy/Library/Developer/Xcode/DerivedData/AptTin-anlnlphskgbkbydlukhsoqjapwpl/Build/Intermediates/AptTin.build/Debug-iphonesimulator/AptTin.build/Objects-normal/x86_64/myapp.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 --ObjC -lPods-AFNetworking -lPods-AMSlideOutController -lPods-DACircularProgress -lPods-HexColors -lPods-LBBlurredImage -lPods-MBProgressHUD -lPods-MWPhotoBrowser -lPods-PSTCollectionView -lPods-SDWebImage -lPods-TSMessages -framework Accelerate -framework AssetsLibrary -framework CoreGraphics -framework ImageIO -framework MapKit -framework MessageUI -framework MobileCoreServices -framework QuartzCore -framework Security -framework SystemConfiguration -framework UIKit -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=8.1 -framework MobileCoreServices -framework Security -framework CoreLocation -framework SystemConfiguration -framework AssetsLibrary -framework MessageUI -framework ImageIO -framework CoreData -framework MapKit -framework QuartzCore -framework Crashlytics -framework CoreGraphics -framework FacebookSDK -framework UIKit -framework Foundation -lPods -Xlinker -dependency_info -Xlinker /Users/jimmy/Library/Developer/Xcode/DerivedData/AptTin-anlnlphskgbkbydlukhsoqjapwpl/Build/Intermediates/AptTin.build/Debug-iphonesimulator/AptTin.build/Objects-normal/x86_64/myapp_dependency_info.dat -o /Users/jimmy/Library/Developer/Xcode/DerivedData/AptTin-anlnlphskgbkbydlukhsoqjapwpl/Build/Products/Debug-iphonesimulator/myapp.app/myapp 

clang: error: unsupported option '--ObjC' 

무엇 오전 내가 빠졌어? - ObjC 플래그가 정확히 어떻게됩니까?

+0

는 기존 프로젝트에 cocoapods 또는 통합 cocoapods와 함께 프로젝트를 시작했습니다
여기 국기에 대한 추가 정보를입니까? –

+0

내 디렉토리에 podfile을 만들고 pod를 설치하여 cocoapods를 추가했습니다. – thebiglebowski11

답변

2

링커 플래그의 맞춤법이 잘못되었습니다. 방금 프로젝트를 체크했는데, '-ObjC'하나의 대시가 있어야하지만 두 개가 아니어야합니다.
https://developer.apple.com/library/ios/qa/qa1490/_index.html
이 설명은 애플이다 :

Passing the -ObjC option to the linker causes it to load all members of static libraries that implement any Objective-C class or category. This will pickup any category method implementations. But it can make the resulting executable larger, and may pickup unnecessary objects. For this reason it is not on by default

관련 문제