linker command failed with exit code 1

2019-07-26 18:27发布

问题:

I am getting some errors and warnings when I build my IOS project

ld: warning: directory not found for option '-L/Users/parikshitpatel/Documents/IphoneDevelopment/FH/funkiorangemobile_iphonehealthadviceapp/Social'
ld: warning: directory not found for option '-LMedia/Twitter/Twitter'
ld: warning: directory not found for option '-LLibrary/Libraries'
ld: warning: directory not found for option '-L/Users/parikshitpatel/Documents/IphoneDevelopment/FH/funkiorangemobile_iphonehealthadviceapp0/Social'
ld: warning: directory not found for option '-L&'
ld: warning: directory not found for option '-LHeaders'
ld: warning: directory not found for option '-LMedia/Twitter'
ld: library not found for -lOAuth
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I am not getting how to fix this error can some one help?

回答1:

It looks like your Library path is incorrect.
Try to go to: Targets - Build Phases - Link Binary with Libraries
and add your Twitter Library/Framework



回答2:

In your Folder path there are blank spaces between them. for example:

/Users/parikshitpatel/Documents/IphoneDevelopment/FH/funkiorangemobile_iphonehealthadviceapp/Social Media

In your Library dependencies write Social\ Media instead.

Do the same for other library.



回答3:

For me I was opening the .xcodeproj Xcode project instead of the .xcworkspace workspace. I'm pretty new to iOS development, but this feels similar to opening the wrong gradle file in Android Studio