Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library not found for -lAFNetworking Error #24

Open
imcoddy opened this issue Jul 28, 2015 · 4 comments
Open

Library not found for -lAFNetworking Error #24

imcoddy opened this issue Jul 28, 2015 · 4 comments

Comments

@imcoddy
Copy link

imcoddy commented Jul 28, 2015

Hi

I cloned the project and tried to build it but got stuck due to the following error, can you tell me how to deal with it?

ld: warning: directory not found for option '-L/Users/di.qiu/workspace/git/bitcoin/bither-ios/Pods/build/Debug-iphoneos'
ld: library not found for -lAFNetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I did execute the as the Wiki says and no error came out from that. But When trying to build the project it just keeps failing.

The full error message is as below

Ld /Users/di.qiu/Library/Developer/Xcode/DerivedData/bither-ios-hilaibkdufseypbjezveyfzbhzoq/Build/Products/Debug-iphonesimulator/bither-ios\ WatchKit\ Extension.appex/bither-ios\ WatchKit\ Extension normal x86_64


cd /Users/di.qiu/workspace/git/bitcoin/bither-ios
export IPHONEOS_DEPLOYMENT_TARGET=8.2
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/php5/bin:/Users/di.qiu/.rbenv/shims:/Users/di.qiu/.rbenv/bin:/usr/local/heroku/bin:/Users/di.qiu/.nvm/versions/io.js/v2.3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Users/di.qiu/.rvm/bin"
/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.4.sdk -L/Users/di.qiu/Library/Developer/Xcode/DerivedData/bither-ios-hilaibkdufseypbjezveyfzbhzoq/Build/Products/Debug-iphonesimulator -L/Users/di.qiu/workspace/git/bitcoin/bither-ios/Pods/OpenSSL/lib -L/Users/di.qiu/workspace/git/bitcoin/bither-ios/Pods/build/Debug-iphoneos -F/Users/di.qiu/Library/Developer/Xcode/DerivedData/bither-ios-hilaibkdufseypbjezveyfzbhzoq/Build/Products/Debug-iphonesimulator -filelist /Users/di.qiu/Library/Developer/Xcode/DerivedData/bither-ios-hilaibkdufseypbjezveyfzbhzoq/Build/Intermediates/bither-ios.build/Debug-iphonesimulator/bither-ios\ WatchKit\ Extension.build/Objects-normal/x86_64/bither-ios\ WatchKit\ Extension.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/../../Frameworks -Xlinker -objc_abi_version -Xlinker 2 -ObjC -lAFNetworking -lBitheri -lCocoaLumberjack -lFMDB -lFXBlurView -lKSCrash -lMKNetworkKit -lReachability -lRegexKitLite -lSimpleKeychain -lc++ -lcrypto -licucore -lsqlite3 -lssl -lz -framework Accelerate -framework CFNetwork -framework CoreGraphics -framework Foundation -framework MessageUI -framework MobileCoreServices -framework QuartzCore -framework Security -framework SystemConfiguration -fobjc-arc -fobjc-link-runtime -fapplication-extension -Xlinker -no_implicit_dylibs -mios-simulator-version-min=8.2 -lPods -Xlinker -dependency_info -Xlinker /Users/di.qiu/Library/Developer/Xcode/DerivedData/bither-ios-hilaibkdufseypbjezveyfzbhzoq/Build/Intermediates/bither-ios.build/Debug-iphonesimulator/bither-ios\ WatchKit\ Extension.build/Objects-normal/x86_64/bither-ios\ WatchKit\ Extension_dependency_info.dat -o /Users/di.qiu/Library/Developer/Xcode/DerivedData/bither-ios-hilaibkdufseypbjezveyfzbhzoq/Build/Products/Debug-iphonesimulator/bither-ios\ WatchKit\ Extension.appex/bither-ios\ WatchKit\ Extension
ld: warning: directory not found for option '-L/Users/di.qiu/workspace/git/bitcoin/bither-ios/Pods/build/Debug-iphoneos'

ld: library not found for -lAFNetworking

clang: error: linker command failed with exit code 1 (use -v to see invocation)

Thanks in advance.

@songchenwen
Copy link
Contributor

I guess this was because CocoaPods hasn't configure dependancies well for the none app targets in the XCode project.

There is an issue of CocoaPods CocoaPods/CocoaPods#3382

You may find some workaround in stackoverflow

@imcoddy
Copy link
Author

imcoddy commented Jul 31, 2015

Thanks for the reply. I will dig in it later to see if it can be solved :)

@Vitaliyy-jomedia
Copy link

I have the same error.
Did you find a solution?

@blaues0cke
Copy link

I can confirm this. Just make sure you added the dependency to all targets (e.g. your Apple Watch App), this solved it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants