Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linking errors when trying to install Google signin

I am trying to integrate Google Sign In into my iOS Apps but while doing this i am getting below error.

Is there any solution to remove below errors?

Undefined symbols for architecture armv7: "_inflate", referenced from: l002 in GoogleSignIn(GTMNSData+zlib.o) "_deflate", referenced from: l001 in GoogleSignIn(GTMNSData+zlib.o) "_inflateEnd", referenced from: l002 in GoogleSignIn(GTMNSData+zlib.o) "deflateInit2", referenced from: l001 in GoogleSignIn(GTMNSData+zlib.o) "inflateInit2", referenced from: l002 in GoogleSignIn(GTMNSData+zlib.o) "_deflateEnd", referenced from: l001 in GoogleSignIn(GTMNSData+zlib.o) ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

like image 240
Vikram Pote Avatar asked Jan 06 '16 05:01

Vikram Pote


2 Answers

This is very common error and doesn't have any specific solution. Although may be following workaround may help you:

  1. If you are not using cocoa-pods use them to add new repos.

  2. Check that you haven't imported .m instead of .h.

  3. Check you haven't add two frameworks accidenlty.

  4. Remove -ObjC Linker flag from `-otherLinkerFlags'

  5. Sometimes using older version of sdk may solve the problem.

  6. Navigate to YourProject--Build Phases and check you haven't added one file more than once. And also any Link Binary and Libraries are not missing from there.

enter image description here

Here is the Image Showing OtherLinkerFlags

Other Linker Flag Discription

For More Detail Refer to this Link

Good Luck... :)

like image 145
Rahul Avatar answered Nov 16 '22 16:11

Rahul


You can fallow below steps

  1. Go to Build settings / Linking / Other Linker Flags and add the "-ObjC" without the quotes. This assume you are using some "header

    file" to map Google framework and for Swift approach.

  2. Go to Build Phases >Link Binary with Librairies > + > Add other, the go to de /usr/lib directory and select "libz.dylib"

  3. Compile

like image 4
My dream Avatar answered Nov 16 '22 16:11

My dream