Getting following error when try to use Layar SDK in my existing app. How can I solve this?
Ld /Users/pnawale/Library/Developer/Xcode/DerivedData/hub-afxxzaqisdfliwbzxbixsaifljcl/Build/Products/Debug-iphoneos/hub.app/hub normal armv7
cd /Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub
setenv IPHONEOS_DEPLOYMENT_TARGET 5.0
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -L/Users/pnawale/Library/Developer/Xcode/DerivedData/hub-afxxzaqisdfliwbzxbixsaifljcl/Build/Products/Debug-iphoneos -L/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/ZBarSDK -L/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/Infosound/Lib -L/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/CrittercismSDK -L/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub -L/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/UserVoiceSDK-2.0.4 -L/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/Libraries -F/Users/pnawale/Library/Developer/Xcode/DerivedData/hub-afxxzaqisdfliwbzxbixsaifljcl/Build/Products/Debug-iphoneos -F/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub -filelist /Users/pnawale/Library/Developer/Xcode/DerivedData/hub-afxxzaqisdfliwbzxbixsaifljcl/Build/Intermediates/hub.build/Debug-iphoneos/hub.build/Objects-normal/armv7/hub.LinkFileList -dead_strip -ObjC -all_load -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=5.0 -lMPOAuthMobile -lsbjson-ios -framework LayarSDK -framework Social -framework AddressBook -framework AddressBookUI -framework UIKit -framework QuartzCore -framework Twitter -framework SystemConfiguration -framework Security -framework OpenAL -framework OpenGLES -framework MessageUI -framework MediaPlayer -framework Foundation -framework CoreGraphics -lc++ -framework CoreTelephony -framework CoreVideo -framework CoreMotion -framework CoreMedia -framework CoreLocation -framework CoreData -framework CoreAudio -framework CFNetwork -framework AVFoundation -framework AudioToolbox -lxml2 -liconv -lz -framework MobileCoreServices -lzbar -linfosound -lCrittercism_v3_4_6 -lUserVoice -o /Users/pnawale/Library/Developer/Xcode/DerivedData/hub-afxxzaqisdfliwbzxbixsaifljcl/Build/Products/Debug-iphoneos/hub.app/hub
duplicate symbol _jpeg_free_large in:
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemansi.o)
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemname.o)
duplicate symbol _jpeg_free_small in:
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemansi.o)
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemname.o)
duplicate symbol _jpeg_get_large in:
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemansi.o)
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemname.o)
duplicate symbol _jpeg_get_small in:
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemansi.o)
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemname.o)
duplicate symbol _jpeg_mem_available in:
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemansi.o)
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemname.o)
duplicate symbol _jpeg_mem_init in:
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemansi.o)
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemname.o)
duplicate symbol _jpeg_mem_term in:
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemansi.o)
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemname.o)
duplicate symbol _jpeg_open_backing_store in:
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemansi.o)
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemname.o)
duplicate symbol _jpeg_free_large in:
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemansi.o)
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemnobs.o)
duplicate symbol _jpeg_free_small in:
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemansi.o)
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemnobs.o)
duplicate symbol _jpeg_get_large in:
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemansi.o)
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemnobs.o)
duplicate symbol _jpeg_get_small in:
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemansi.o)
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemnobs.o)
duplicate symbol _jpeg_mem_available in:
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemansi.o)
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemnobs.o)
duplicate symbol _jpeg_mem_init in:
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemansi.o)
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemnobs.o)
duplicate symbol _jpeg_mem_term in:
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemansi.o)
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemnobs.o)
duplicate symbol _jpeg_open_backing_store in:
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemansi.o)
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jmemnobs.o)
duplicate symbol _main in:
/Users/pnawale/Library/Developer/Xcode/DerivedData/hub-afxxzaqisdfliwbzxbixsaifljcl/Build/Intermediates/hub.build/Debug-iphoneos/hub.build/Objects-normal/armv7/main.o
/Users/pnawale/Documents/Paresh/Yamaha_iPhone/Code/Final/hub/LayarSDK.framework/LayarSDK(jpegtran.o)
ld: 17 duplicate symbols for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This can happen if you accidentally #import
a .m
file instead of the .h
!
Generally, this kind of error occurs due to duplicate classes and xibs in your project folder. For example, in my project I had some class files duplicated(.h/.m files). You can see these duplicate classes under target->Build phases->compile sources
.
Just look and remove extra classes. Problem will be solved.
Happens with static variables in a header file (header file included in more than one implementations file).
I was getting this error because I used the Xcode recommended warning flags. GCC_NO_COMMON_BLOCKS = YES was causing the issue. Setting this back to NO fixed it for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With