2

Following are the steps I have followed to integrate YouTube upload in my app,

  • added libGTLTouchStaticlib.a and respective header folder into my project.
  • added libGTLTouchStaticlib.a in General->Linked Frameworks and Library.
  • mentioned -ObjC and -all_load in other linker field of build settings
  • added systemConfigaration and security framework in General->Linked Frameworks and Library

But when I build its giving following error,

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

rishu1992
  • 1,414
  • 3
  • 14
  • 33
  • libGTLTouchStaticlib.a looks red color are normal – Arun Jan 28 '15 at 06:20
  • Then check the header search path ... – Arun Jan 28 '15 at 06:28
  • what it is supposed to be? Please explain – rishu1992 Jan 28 '15 at 06:30
  • what is your target version @rishu1992 – Arun Jan 28 '15 at 06:37
  • For several reason we may get the following issue. The following link may help you http://stackoverflow.com/questions/5329001/apple-mach-o-linker-error-when-compiling-for-device#comment41741156_5329001 – Arun Jan 28 '15 at 06:40
  • Change to ios 5 or ios 6 – Arun Jan 28 '15 at 06:52
  • It will work fine if I remove those lib.a and header files. It worked well in my sample app even after adding lib.a and header file. But when Im adding to my project its giving that error. – rishu1992 Jan 28 '15 at 07:24
  • Please exactly what is the error your getting update the question – Arun Jan 28 '15 at 08:32
  • clang: error: linker command failed with exit code 1 (use -v to see invocation) – rishu1992 Jan 28 '15 at 08:42
  • Go to Target > Build Phases > Link Binary with libraries : Remove all your frameworks and add them again ! Hope it works for you ! – Arun Jan 28 '15 at 08:43
  • I did that it dint work – rishu1992 Jan 28 '15 at 08:45
  • clang: error: linker command failed with exit code 1 (use -v to see invocation): ld: duplicate symbol _OBJC_CLASS_$_Algebra5FirstViewController in .../Algebra5-anwcuftojtxtgkfootneeeqhwztj/Build/Intermediates/Algebra5.build/Debug-iphonesimulator/Algebra5.build/Objects-normal/i386/ExercisesViewController.o and .../Algebra5-anwcuftojtxtgkfootneeeqhwztj/Build/Intermediates/Algebra5.build/Debug-iphonesimulator/PSLE Algebra5.build/Objects-normal/i386/PSLE_Algebra5FirstViewController.o for architecture i386 LIKE POST FULL MESSAGE – Arun Jan 28 '15 at 08:51
  • If I use libGoogleAnalytics.a and libGTLTouchStaticlib. in same project does it give same problem? Becouse it gave duplicate symbol error – rishu1992 Jan 28 '15 at 09:01
  • Check architechure REMOVE==> arm64 – Arun Jan 28 '15 at 09:03
  • Its standard arm7 arm64 – rishu1992 Jan 28 '15 at 09:05
  • error is : /Volumes/Development/GYV/Befor clean up/Dazzle_c2.2.1_sharing befor pull/Dazzle/libGTLTouchStaticLib.a(GTMReadMonitorInputStream.o) error is: ld: 210 duplicate symbols for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation) – rishu1992 Jan 28 '15 at 09:20
  • in finder search GTMReadMonitorInputStream this file , in any play by mistake imported as GTMReadMonitorInputStream.m – Arun Jan 28 '15 at 09:26

1 Answers1

1

Thank You @Spynet. I found the problem. I havent deleted all the classes of previous api before using lib.a . Some of the classes were remaining without being deleted. So it was giving above error (duplicate classes). After removing it works

rishu1992
  • 1,414
  • 3
  • 14
  • 33