0

I'm running into an issue and I've reached the end of my knowledge in terms of my trouble shooting, Im seeing a typical "Undefined sybmols for architecute X" error, which typically is easily sovled by ensuring the architecutre is set int he project workspace, however it does not seem to have any affect here.

My podfile is like so:

platform :ios, '5.0'
pod 'CocoaLumberjack'

I've also tried several version of CocoaLumberjack to not avail, from 2.0 up to the latest Beta version.

My current Cocoapods version is 0.39.0.rc.1, again, I've tried multiple versions.

CocoaLumberjack is included in my AppDelegate.m via:

#import <CocoaLumberjack/CocoaLumberjack.h>

and referenced via:

[DDLog addLogger:[DDASLLogger sharedInstance]];

I am building on XCode 7.0 (7A220) The error looks like this:

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, and "Pods" both use these settings:

Build Active Arhitecture Only: NO

Architectures: armv7, arm64, armv7s, x86_64

Supported Platforms iOS

Valid Architecture: armv7, arm64, armv7s, x86_64

I've played around with the Arhitectures, and supported architecutres quite a bit.

Any help would be apprecaited

xceph
  • 1,036
  • 2
  • 13
  • 28

1 Answers1

0

I got the same issue, but I solved it the way that I added "CocoaLumberjack" files to my XCode project via File>Add Files to... instead other ways like drag-drop or anything else.

Basically, I noticed that the main difference is that "CocoaLumberjack" files should be included as compile sources: Build Phases>Compile Sources

When you do it my recommended way XCode add them there automatically.

Darius Miliauskas
  • 3,391
  • 4
  • 35
  • 53