Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

library not found for -lPods-AFNetworking

I am getting the following error when using AFNetworking:

''library not found for -lPods-AFNetworking''
"linker command failed with exit code 1 (use -v to see invocation)."

I checked for all missing frameworks,and they are all present .Additionally this project works for other people(we pulled it from github) and I'm the only person for whom it does not work.(its a joint project)

We all use Xcode 6.2. I do not understand what could be wrong or what went missing. I tried pulling using the command line,sourceTree and even from Xcode git source control.

I also tried different versions of Xcode. But all the other teamates are using Xcode 6.2, which I am using now.

It used to work before, it suddenly stopped working.

Any ideas are welcome,thank you!

Following is the detailed errors:

ld: warning: directory not found for option '-L/Users/ramapriyasridharan/Documents/Rama-3:06:2015-ios/Mapbox' ld: warning: directory not found for option '-L/Users/ramapriyasridharan/Documents/Rama-3:06:2015-ios/Pods/build/Debug-iphoneos' ld: library not found for -lPods-AFNetworking clang: error: linker command failed with exit code 1 (use -v to see invocation)

EDIT:

After opening the workspace file, I did not get the mach O linker error any more, but I am getting the following error:

Command /Volumes/Xcode 1/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/momc failed with exit code 1

I asked my team mates who said that it still works fine,so it is still a problem only on my computer!

like image 893
LoveMeow Avatar asked Jun 02 '15 16:06

LoveMeow


2 Answers

Instead of opening the XCode project, you should open up the WorkSpace file.

like image 131
some_id Avatar answered Sep 29 '22 11:09

some_id


I was facing the same problem and following solution worked for me:

  1. Go to project setting -> build setting -> other linker flag, and remove all flags that have -lpod or frameworks or related to pods. Don't remove the required flags (e.g. -ObjC, -licucore, -libxml2)
  2. Add a flag $(inherited) at the top.
  3. Clean the project and compile.
like image 28
Teena nath Paul Avatar answered Sep 29 '22 13:09

Teena nath Paul