Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error "library not found for" after putting application in AdMob

I am getting an error after I put my application in an AdMob. The app was working until today. The error is the following:

ld: library not found for -lGoogleAdMobAds
clang: error: linker command failed with exit code 1 (use -v to see invocation)

How can I fix this? Thank you.

like image 904
ViniciusPV Avatar asked Oct 08 '22 02:10

ViniciusPV


2 Answers

I had a similar "library not found" issue. However it was because I accidentally was using the .xcodeproj file instead of the .xcworkspace file.

like image 357
Casper Avatar answered Oct 10 '22 14:10

Casper


Sometimes you just remove the reference of the library and add reference again.

Apart from adding the Google Mobile Ads SDK and other libraries again from scratch, I would recommend you checking the Library Search Paths. There are instances when you copy or duplicate a target, Xcode decides that it needs to escape any double quotes " with a '\'. Make sure you remove all the \’s - it should look like this -

enter image description here

I was able to duplicate the error, by doing prefixing my path with multiple '\'.

like image 120
raurora Avatar answered Oct 10 '22 16:10

raurora