2015-10-13 48 views
0

我遇到了一个问题,就我的故障排除而言,我已经达到了我的知识结束时间,我看到一个典型的“未定义的架构X的sybmols”错误,这通常很容易通过确保架构设置在项目工作区中来简化,但是在这里似乎没有任何影响。通过CocoaPods将iOS项目与CocoaLumberjack链接,未定义的体系结构

我podfile是像这样:

platform :ios, '5.0' 
pod 'CocoaLumberjack' 

我也试过CocoaLumberjack的几个版本没有用的,从2.0到最新的Beta版。

我目前的Cocoapods版本是0.39.0.rc.1,我试过了多个版本。

CocoaLumberjack通过包含在我AppDelegate.m:

#import <CocoaLumberjack/CocoaLumberjack.h> 

,并通过引用:

[DDLog addLogger:[DDASLLogger sharedInstance]]; 

我建设上的XCode 7.0(7A220) 错误看起来是这样的:

Ld /Users/xceph/Library/Developer/Xcode/DerivedData/MyProject-dxhidbgfhzkukyeaiirdnjduposm/Build/Intermediates/MyProject.build/Debug-iphonesimulator/MyProject.build/Objects-normal/x86_64/MyProject normal x86_64 
    cd /Users/xceph/MyProject-iOS 
    export IPHONEOS_DEPLOYMENT_TARGET=7.0 
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/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/iPhoneSimulator9.0.sdk -L/Users/xceph/Library/Developer/Xcode/DerivedData/MyProject-dxhidbgfhzkukyeaiirdnjduposm/Build/Products/Debug-iphonesimulator -L/Users/xceph/MyProject-iOS -L/Users/xceph/MyProject-iOS/GoogleLibrary -F/Users/xceph/Library/Developer/Xcode/DerivedData/MyProject-dxhidbgfhzkukyeaiirdnjduposm/Build/Products/Debug-iphonesimulator -F/Users/xceph/MyProject-iOS -F/Users/xceph/MyProject-iOS/FacebookSDK -filelist /Users/xceph/Library/Developer/Xcode/DerivedData/MyProject-dxhidbgfhzkukyeaiirdnjduposm/Build/Intermediates/MyProject.build/Debug-iphonesimulator/MyProject.build/Objects-normal/x86_64/MyProject.LinkFileList -mios-simulator-version-min=7.0 -Xlinker -objc_abi_version -Xlinker 2 -all_load -fobjc-link-runtime -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/xceph/Library/Developer/Xcode/DerivedData/MyProject-dxhidbgfhzkukyeaiirdnjduposm/Build/Intermediates/MyProject.build/Debug-iphonesimulator/MyProject.build/MyProject.app.xcent -framework CoreData -framework ShinobiEssentials -lstdc++.6 -framework ShinobiCharts -framework CoreText -lstdc++ -framework ShinobiGauges -framework AVFoundation -licucore -framework OpenGLES -framework CFNetwork -lsqlite3 -framework Foundation -framework UIKit -framework CoreGraphics -framework ExternalAccessory -framework QuartzCore -framework MessageUI -framework SystemConfiguration -framework StoreKit -lPayPalMPL -framework Security -lz.1.1.3 -lGoogleAnalyticsServices -lxml2.2 -framework DropboxSDK -framework FacebookSDK -framework ShinobiGrids -framework Crashlytics -lPods -Xlinker -dependency_info -Xlinker /Users/xceph/Library/Developer/Xcode/DerivedData/MyProject-dxhidbgfhzkukyeaiirdnjduposm/Build/Intermediates/MyProject.build/Debug-iphonesimulator/MyProject.build/Objects-normal/x86_64/MyProject_dependency_info.dat -o /Users/xceph/Library/Developer/Xcode/DerivedData/MyProject-dxhidbgfhzkukyeaiirdnjduposm/Build/Intermediates/MyProject.build/Debug-iphonesimulator/MyProject.build/Objects-normal/x86_64/MyProject 

Undefined symbols for architecture x86_64: 
    "_OBJC_CLASS_$_DDASLLogger", referenced from: 
     objc-class-ref in AppDelegate_iPhone.o 
    "_OBJC_CLASS_$_DDLog", referenced from: 
     objc-class-ref in AppDelegate_iPhone.o 
ld: symbol(s) not found for architecture x86_64 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

MyProject和“Pods”都使用这些设置:

构建主动Arhitecture只有:NO

体系结构:ARMv7的,arm64,armv7s,x86_64的

支持平台的iOS

有效的体系结构:ARMv7的,arm64,armv7s,x86_64的

我已经和Arhitectures一起玩过了,并且支持了很多架构。

任何帮助将apprecaited

回答

0

我得到了同样的问题,但我解决它,我通过文件添加“CocoaLumberjack”文件到我的XCode项目的方式>将文件添加到...而不是其他方式像拖放或其他任何东西。

基本上,我注意到的主要区别是,“CocoaLumberjack”文件应包括编译来源:构建阶段>编译源代码

当你做我的推荐方式的XCode自动添加他们那里。

相关问题