linking error in CanvasPop API ios - ios

I am integarting canvaspop in my application.When I am integrating it in sample application it is working fine.But when I am using it in my app with other 3rd pary framework like GPUimage,IKImagePicker,xpload and other more.I am getting these errors while linking framework to my app.
Ld /Users/mandeep/Library/Developer/Xcode/DerivedData/ImageEditorPro-bkvuyjzwftcotmgjlrocdiyaqkqu/Build/Products/Debug-iphonesimulator/ImageEditorPro.app/ImageEditorPro normal i386
cd "/Volumes/DATA/Chakshu/clientProjects/Kamil/Editlab Testing/EditLab"
export IPHONEOS_DEPLOYMENT_TARGET=6.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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 i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -L/Users/mandeep/Library/Developer/Xcode/DerivedData/ImageEditorPro-bkvuyjzwftcotmgjlrocdiyaqkqu/Build/Products/Debug-iphonesimulator -LVendors/IAPPVerification -LVendors/TestFlight -LVendors/Canvas -F/Users/mandeep/Library/Developer/Xcode/DerivedData/ImageEditorPro-bkvuyjzwftcotmgjlrocdiyaqkqu/Build/Products/Debug-iphonesimulator -FVendors/IKImagePickerController/Vendors/FacebookSDK -FImageEditorPro -FVendors/GooglePlus -F/Volumes/DATA/Chakshu/clientProjects/Kamil/Editlab\ Testing/EditLab/IddictionSDK.embeddedframework -F/Volumes/DATA/Chakshu/clientProjects/Kamil/Editlab\ Testing/EditLab/IddictionSDK.embeddedframework/XplodeSDK.embeddedframework -F/Volumes/DATA/Chakshu/clientProjects/Kamil/Editlab\ Testing/EditLab/XplodeSDK.embeddedframework -FVendors/Canvas -F/Volumes/DATA/Chakshu/clientProjects/Kamil/Editlab\ Testing/EditLab/Vendors/Canvas -filelist /Users/mandeep/Library/Developer/Xcode/DerivedData/ImageEditorPro-bkvuyjzwftcotmgjlrocdiyaqkqu/Build/Intermediates/ImageEditorPro.build/Debug-iphonesimulator/ImageEditorPro.build/Objects-normal/i386/ImageEditorPro.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.0 -framework Security -framework MobileCoreServices -framework CFNetwork -framework Accelerate -lz -lObjectiveFlickr -framework PopUpLib /Users/mandeep/Library/Developer/Xcode/DerivedData/ImageEditorPro-bkvuyjzwftcotmgjlrocdiyaqkqu/Build/Products/Debug-iphonesimulator/libTMTumblrSDK.a -framework CoreMotion -framework MediaPlayer -framework StoreKit -framework GoogleOpenSource -framework FacebookSDK -framework SystemConfiguration -framework MapKit -framework CoreVideo -framework CoreMedia -framework OpenGLES -framework AVFoundation /Users/mandeep/Library/Developer/Xcode/DerivedData/ImageEditorPro-bkvuyjzwftcotmgjlrocdiyaqkqu/Build/Products/Debug-iphonesimulator/libGPUImage.a -framework AdSupport -lsqlite3 -framework Social -framework Accounts -framework AssetsLibrary -lbeeblex -framework ImageIO -framework QuartzCore /Users/mandeep/Library/Developer/Xcode/DerivedData/ImageEditorPro-bkvuyjzwftcotmgjlrocdiyaqkqu/Build/Products/Debug-iphonesimulator/libIKImagePickerController.a -framework CoreGraphics -framework UIKit -lTestFlight -framework XplodeSDK -framework Foundation -framework GooglePlus -Xlinker -dependency_info -Xlinker /Users/mandeep/Library/Developer/Xcode/DerivedData/ImageEditorPro-bkvuyjzwftcotmgjlrocdiyaqkqu/Build/Intermediates/ImageEditorPro.build/Debug-iphonesimulator/ImageEditorPro.build/Objects-normal/i386/ImageEditorPro_dependency_info.dat -o /Users/mandeep/Library/Developer/Xcode/DerivedData/ImageEditorPro-bkvuyjzwftcotmgjlrocdiyaqkqu/Build/Products/Debug-iphonesimulator/ImageEditorPro.app/ImageEditorPro
duplicate symbol _OBJC_CLASS_$_Reachability in:
/Users/mandeep/Library/Developer/Xcode/DerivedData/ImageEditorPro-bkvuyjzwftcotmgjlrocdiyaqkqu/Build/Intermediates/ImageEditorPro.build/Debug-iphonesimulator/ImageEditorPro.build/Objects-normal/i386/Reachability.o
Vendors/Canvas/PopUpLib.framework/PopUpLib(libPopUpLib.a-i386-master.o)
duplicate symbol _OBJC_METACLASS_$_Reachability in:
/Users/mandeep/Library/Developer/Xcode/DerivedData/ImageEditorPro-bkvuyjzwftcotmgjlrocdiyaqkqu/Build/Intermediates/ImageEditorPro.build/Debug-iphonesimulator/ImageEditorPro.build/Objects-normal/i386/Reachability.o
Vendors/Canvas/PopUpLib.framework/PopUpLib(libPopUpLib.a-i386-master.o)
duplicate symbol _kReachabilityChangedNotification in:
/Users/mandeep/Library/Developer/Xcode/DerivedData/ImageEditorPro-bkvuyjzwftcotmgjlrocdiyaqkqu/Build/Intermediates/ImageEditorPro.build/Debug-iphonesimulator/ImageEditorPro.build/Objects-normal/i386/Reachability.o
Vendors/Canvas/PopUpLib.framework/PopUpLib(libPopUpLib.a-i386-master.o)
ld: 3 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I think there are some setting in the build setting which have to change to successfully link this framework to app.
Thanks

Try having a look at this question and solution:
Conflict between class and static library
It explains how the .m files are possibly conflicting with each other.
Try out this solution and comment on the outcome.

Related

Getting MobileVLCKit to work through Cocoapods

I've been struggling to get VLC working in my iOS app for a while now. Using Cocoapods, the MobileVLCKit is imported into my project. When I run the app now, it compiles with no problem. However, when I include anything from the MobileVLCKit (MobileVLCKit.h, VLCMediaPlayer.h), the app crashes, telling me that symbols aren't found.
This is the crash:
Ld /Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Products/Debug-iphoneos/Cameras.app/Cameras normal arm64
cd /Users/JohnDoe/ios-cam-app/iOSCamApp
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export 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 arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -L/Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Products/Debug-iphoneos -LLibraries -LLibraries/FFmpeg -LLibraries/kxmovie -LLibraries/MBProgressHUD -LLibraries/Nabto -LLibraries/FFmpeg/include -LLibraries/kxmovie/kxmovie.bundle -LLibraries/Nabto/include -LLibraries/Nabto/lib -LLibraries/FFmpeg/include/libavcodec -LLibraries/FFmpeg/include/libavdevice -LLibraries/FFmpeg/include/libavfilter -LLibraries/FFmpeg/include/libavformat -LLibraries/FFmpeg/include/libavutil -LLibraries/FFmpeg/include/libswresample -LLibraries/FFmpeg/include/libswscale -L/Users/JohnDoe/ios-cam-app/iOSCamApp/Libraries/FFmpeg -L/Users/JohnDoe/ios-cam-app/iOSCamApp/Libraries/Nabto/lib -F/Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Products/Debug-iphoneos -FFrameworks -F/Users/JohnDoe/ios-cam-app/iOSCamApp -filelist /Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Intermediates/iOSCamApp.build/Debug-iphoneos/iOSCamApp.build/Objects-normal/arm64/Cameras.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -dead_strip -lPods-AFNetworking -framework CoreGraphics -framework MobileCoreServices -framework Security -framework SystemConfiguration -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=7.0 -lstdc++.6.0.9 -lc++ -liconv.2.4.0 -lbz2 -lz -framework MediaPlayer -framework CoreAudio -framework Crashlytics -framework AudioToolbox -framework Accelerate -framework OpenGLES -lnabto_static_external -framework CoreVideo -framework CoreMedia -framework CFNetwork -framework AVFoundation -lavutil -lavfilter -lPods -lavdevice -lswscale -lnabto_client_api_static -framework Fabric -lavformat -lswresample -lavcodec -framework QuartzCore -framework CoreGraphics -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Intermediates/iOSCamApp.build/Debug-iphoneos/iOSCamApp.build/Objects-normal/arm64/Cameras_dependency_info.dat -o /Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Products/Debug-iphoneos/Cameras.app/Cameras
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_VLCMediaPlayer", referenced from:
objc-class-ref in FirstViewController.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
When I installed VLC through cocoa pods, I got this warning:
The `iOSCamApp [Release]` target overrides the `OTHER_LDFLAGS` build setting defined in `../Pods/Target Support Files/Pods-iOSCamApp/Pods-iOSCamApp.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
When I add the $(inherited) flag and try to build, I get the following crash:
Ld /Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Products/Debug-iphoneos/Cameras.app/Cameras normal arm64
cd /Users/JohnDoe/ios-cam-app/iOSCamApp
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export 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 arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -L/Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Products/Debug-iphoneos -LLibraries -LLibraries/FFmpeg -LLibraries/kxmovie -LLibraries/MBProgressHUD -LLibraries/Nabto -LLibraries/FFmpeg/include -LLibraries/kxmovie/kxmovie.bundle -LLibraries/Nabto/include -LLibraries/Nabto/lib -LLibraries/FFmpeg/include/libavcodec -LLibraries/FFmpeg/include/libavdevice -LLibraries/FFmpeg/include/libavfilter -LLibraries/FFmpeg/include/libavformat -LLibraries/FFmpeg/include/libavutil -LLibraries/FFmpeg/include/libswresample -LLibraries/FFmpeg/include/libswscale -L/Users/JohnDoe/ios-cam-app/iOSCamApp/Libraries/FFmpeg -L/Users/JohnDoe/ios-cam-app/iOSCamApp/Libraries/Nabto/lib -F/Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Products/Debug-iphoneos -FFrameworks -F/Users/JohnDoe/ios-cam-app/iOSCamApp -filelist /Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Intermediates/iOSCamApp.build/Debug-iphoneos/iOSCamApp.build/Objects-normal/arm64/Cameras.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -dead_strip -lPods-AFNetworking -framework CoreGraphics -framework MobileCoreServices -framework Security -framework SystemConfiguration -ObjC -lPods-AFNetworking -lbz2 -liconv -lstdc++ -lxml2 -lz -framework AVFoundation -framework AudioToolbox -framework CFNetwork -framework CoreGraphics -framework CoreText -framework MobileCoreServices -framework MobileVLCKit -framework OpenGLES -framework QuartzCore -framework Security -framework SystemConfiguration -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=7.0 -lstdc++.6.0.9 -lc++ -liconv.2.4.0 -lbz2 -lz -framework MediaPlayer -framework CoreAudio -framework Crashlytics -framework AudioToolbox -framework Accelerate -framework OpenGLES -lnabto_static_external -framework CoreVideo -framework CoreMedia -framework CFNetwork -framework AVFoundation -lavutil -lavfilter -lPods -lavdevice -lswscale -lnabto_client_api_static -framework Fabric -lavformat -lswresample -lavcodec -framework QuartzCore -framework CoreGraphics -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Intermediates/iOSCamApp.build/Debug-iphoneos/iOSCamApp.build/Objects-normal/arm64/Cameras_dependency_info.dat -o /Users/JohnDoe/Library/Developer/Xcode/DerivedData/iOSCamApp-cnnuesgeqommwvbqtarspgwsjgbn/Build/Products/Debug-iphoneos/Cameras.app/Cameras
ld: framework not found MobileVLCKit
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Does anyone know what to do? I've tried so many things and nothing seems to help. Autocomplete is able to read the VLC stuff and autocompletes it for me in Xcode, so the framework should be fine.
Undefined symbols for architecture arm64:
That seems to be the problem. You're compiling for the simulator and apparently MobileVLCKit isn't compiled for it. ld is the linker that complains about this. Have you tried running it on the device?
Check what architectures your project and MobileVLCKit are active on.

Where is liphone-lib in a unity generated xcode project?

I am having this strange issue ever since I upgraded my unity. When I build the generated Xcode project I get the following error:
Ld /Users/Ali/Library/Developer/Xcode/DerivedData/Unity-iPhone-arybbykagdcklhdbmekvfmdgxmax/Build/Products/pxelfall.app/pxelfall normal armv7
cd /Users/Ali/Desktop/Pixel.Fall.iOS-soomla-rollback
export IPHONEOS_DEPLOYMENT_TARGET=5.0
export 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/iPhoneOS8.1.sdk
-L/Users/Ali/Library/Developer/Xcode/DerivedData/Unity-iPhone-arybbykagdcklhdbmekvfmdgxmax/Build/Products
-L/Users/Ali/SweetPixel/Pixel.Fall/Pixel.Fall/Assets/Facebook/Editor/iOS/FacebookSDK
-L/Users/Ali/Desktop/Pixel.Fall.iOS-soomla-rollback
-L\"/Users/Ali/Desktop/Pixel.Fall.iOS-soomla-rollback/Libraries\"
-L/Users/Ali/Desktop/Pixel.Fall.iOS-soomla-rollback/Libraries
-F/Users/Ali/Library/Developer/Xcode/DerivedData/Unity-iPhone-arybbykagdcklhdbmekvfmdgxmax/Build/Products
-F/Users/Ali/Desktop/Pixel.Fall.iOS-soomla-rollback/Libraries
-F/Users/Ali/Desktop/Pixel.Fall.iOS-soomla-rollback
-filelist /Users/Ali/Library/Developer/Xcode/DerivedData/Unity-iPhone-arybbykagdcklhdbmekvfmdgxmax/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/pxelfall.LinkFileList
-dead_strip -weak_framework CoreMotion -weak-lSystem -stdlib=libstdc++ -fobjc-link-runtime -miphoneos-version-min=5.0 -lz -lc++ -framework CoreText -framework CoreTelephony -framework CoreData
-framework AssetsLibrary -framework AddressBook -framework Foundation
-framework GooglePlayGames -framework UIKit -framework GoogleOpenSource
-framework OpenGLES -framework QuartzCore -framework OpenAL -liconv.2
-liPhone-lib -framework AudioToolbox -framework CFNetwork -framework MediaPlayer -framework CoreLocation
-framework SystemConfiguration -weak_framework iAd -framework CoreMedia -framework CoreVideo
-framework GooglePlus -weak_framework AVFoundation -framework CoreGraphics
-weak_framework CoreMotion -weak_framework GameKit -lGoogleAdMobAds -weak-lsqlite3.0 /Users/Ali/SweetPixel/Pixel.Fall/Pixel.Fall/Assets/Facebook/Editor/iOS/FacebookSDK/FacebookSDK.a
-weak_framework Accounts -weak_framework AdSupport -weak_framework Social -weak_framework Security -Xlinker -dependency_info
-Xlinker /Users/Ali/Library/Developer/Xcode/DerivedData/Unity-iPhone-arybbykagdcklhdbmekvfmdgxmax/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/pxelfall_dependency_info.dat
-o /Users/Ali/Library/Developer/Xcode/DerivedData/Unity-iPhone-arybbykagdcklhdbmekvfmdgxmax/Build/Products/pxelfall.app/pxelfall
ld: warning: directory not found for option '-L"/Users/Ali/Desktop/Pixel.Fall.iOS-soomla-rollback/Libraries"' ld: library not found for -liPhone-lib clang: error: linker command failed with exit code 1 (use -v to see invocation)
I cannot find liphone-lib anywhere in the project. I have been able to build this project effortlessly before. I am using unity 4.5.5 and Xcode 6.1
Please help
Ok I managed to fix it. I had updated to unity 4.5 so it broke my project. I deleted everything and rebuilt again by overwriting old files. That fixed the error.

How to fix Apple Mach -O-linker warning Directory is not found error

I am facing this warning in Xcode 5.1.
How to fix this error
Here the Error is Showing like...
Ld /Users/riz/Library/Developer/Xcode/DerivedData/SedioiOS-dfvlolozvfewogempmjncnwobvbw/Build/Products/Debug-iphonesimulator/SedioiOS.app/SedioiOS normal i386
cd /Users/riz/Desktop/vine-clone-iphone/SedioiOS
export IPHONEOS_DEPLOYMENT_TARGET=6.1
export PATH="/Applications/Xcode 2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode 2.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode\ 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode\ 2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -L/Users/riz/Library/Developer/Xcode/DerivedData/SedioiOS-dfvlolozvfewogempmjncnwobvbw/Build/Products/Debug-iphonesimulator -F/Users/riz/Library/Developer/Xcode/DerivedData/SedioiOS-dfvlolozvfewogempmjncnwobvbw/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -filelist /Users/riz/Library/Developer/Xcode/DerivedData/SedioiOS-dfvlolozvfewogempmjncnwobvbw/Build/Intermediates/SedioiOS.build/Debug-iphonesimulator/SedioiOS.build/Objects-normal/i386/SedioiOS.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.1 -framework AVFoundation -framework CoreLocation -framework MapKit -framework MessageUI -lz.1.2.5 -lz -framework CoreMedia -framework CoreAudio -framework CoreVideo -framework MobileCoreServices -framework ImageIO -framework AssetsLibrary -framework MediaPlayer -framework Security -framework QuartzCore -framework CFNetwork -framework SystemConfiguration -framework UIKit -framework Foundation -framework CoreGraphics -Xlinker -dependency_info -Xlinker /Users/riz/Library/Developer/Xcode/DerivedData/SedioiOS-dfvlolozvfewogempmjncnwobvbw/Build/Intermediates/SedioiOS.build/Debug-iphonesimulator/SedioiOS.build/Objects-normal/i386/SedioiOS_dependency_info.dat -o /Users/riz/Library/Developer/Xcode/DerivedData/SedioiOS-dfvlolozvfewogempmjncnwobvbw/Build/Products/Debug-iphonesimulator/SedioiOS.app/SedioiOS
----------
`ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Library/Frameworks'`
Add this $(DEVELOPER_FRAMEWORKS_DIR) on Framework Search Paths in Build Settings..
Check the Screenshot Image.. maybe its helpful to you..
then clean,build and run..

Duplicate symbol - third party library Xcode 5.1

I need your help to resolve this issue. I am importing a third party library under frameworks and started seeing this error. Can you please help me to resolve this issue?
Ld /Users/rsangili/Library/Developer/Xcode/DerivedData/ADTCommercial-cpvyllovxoojyngrlpxrjwdjxido/Build/Products/Debug-iphonesimulator/ADTCommercial.app/ADTCommercial normal i386
cd /Users/rsangili/Desktop/Personal/iPhone-xcodeproj
export IPHONEOS_DEPLOYMENT_TARGET=6.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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 i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk -L/Users/rsangili/Library/Developer/Xcode/DerivedData/ADTCommercial-cpvyllovxoojyngrlpxrjwdjxido/Build/Products/Debug-iphonesimulator -L/Users/rsangili/Desktop/Personal/iPhone-xcodeproj/AMPSmartClient -L/Users/rsangili/Desktop/Personal/iPhone-xcodeproj/Custom/ADT_Resources/Soti_SDK -L/Users/rsangili/Desktop/Personal/iPhone-xcodeproj/Custom/BarcodeScanner/iphone/ZXingWidget/build/Release-iphoneos -F/Users/rsangili/Library/Developer/Xcode/DerivedData/ADTCommercial-cpvyllovxoojyngrlpxrjwdjxido/Build/Products/Debug-iphonesimulator -filelist /Users/rsangili/Library/Developer/Xcode/DerivedData/ADTCommercial-cpvyllovxoojyngrlpxrjwdjxido/Build/Intermediates/ADTCommercial.build/Debug-iphonesimulator/ADTCommercial.build/Objects-normal/i386/ADTCommercial.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -ObjC -lxml2 -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.1 /Users/rsangili/Library/Developer/Xcode/DerivedData/ADTCommercial-cpvyllovxoojyngrlpxrjwdjxido/Build/Products/Debug-iphonesimulator/libZXingWidget.a -liconv -lstdc++ -lc++ -lxml2 -framework CoreTelephony -framework AddressBook -framework AddressBookUI -framework AudioToolbox -framework AVFoundation -framework CoreLocation -framework CoreMedia -framework CoreVideo -weak_framework AdSupport -lSOTIMCAgentSDK -framework Foundation -framework UIKit -framework CoreGraphics -framework CoreFoundation -framework CoreData -framework QuartzCore -lz -framework CFNetwork -framework SystemConfiguration -framework Security -lAMPSmartClient -Xlinker -dependency_info -Xlinker /Users/rsangili/Library/Developer/Xcode/DerivedData/ADTCommercial-cpvyllovxoojyngrlpxrjwdjxido/Build/Intermediates/ADTCommercial.build/Debug-iphonesimulator/ADTCommercial.build/Objects-normal/i386/ADTCommercial_dependency_info.dat -o /Users/rsangili/Library/Developer/Xcode/DerivedData/ADTCommercial-cpvyllovxoojyngrlpxrjwdjxido/Build/Products/Debug-iphonesimulator/ADTCommercial.app/ADTCommercial
duplicate symbol _OBJC_IVAR_$_KeychainItemWrapper.genericPasswordQuery in:
/Users/rsangili/Library/Developer/Xcode/DerivedData/ADTCommercial-cpvyllovxoojyngrlpxrjwdjxido/Build/Intermediates/ADTCommercial.build/Debug-iphonesimulator/ADTCommercial.build/Objects-normal/i386/KeychainItemWrapper.o
/Users/rsangili/Desktop/Personal/iPhone-xcodeproj/AMPSmartClient/libAMPSmartClient.a(KeychainItemWrapper.o)
duplicate symbol _OBJC_IVAR_$_KeychainItemWrapper.keychainItemData in:
/Users/rsangili/Library/Developer/Xcode/DerivedData/ADTCommercial-cpvyllovxoojyngrlpxrjwdjxido/Build/Intermediates/ADTCommercial.build/Debug-iphonesimulator/ADTCommercial.build/Objects-normal/i386/KeychainItemWrapper.o
/Users/rsangili/Desktop/Personal/iPhone-xcodeproj/AMPSmartClient/libAMPSmartClient.a(KeychainItemWrapper.o)
duplicate symbol _OBJC_CLASS_$_KeychainItemWrapper in:
/Users/rsangili/Library/Developer/Xcode/DerivedData/ADTCommercial-cpvyllovxoojyngrlpxrjwdjxido/Build/Intermediates/ADTCommercial.build/Debug-iphonesimulator/ADTCommercial.build/Objects-normal/i386/KeychainItemWrapper.o
/Users/rsangili/Desktop/Personal/iPhone-xcodeproj/AMPSmartClient/libAMPSmartClient.a(KeychainItemWrapper.o)
duplicate symbol _OBJC_METACLASS_$_KeychainItemWrapper in:
/Users/rsangili/Library/Developer/Xcode/DerivedData/ADTCommercial-cpvyllovxoojyngrlpxrjwdjxido/Build/Intermediates/ADTCommercial.build/Debug-iphonesimulator/ADTCommercial.build/Objects-normal/i386/KeychainItemWrapper.o
/Users/rsangili/Desktop/Personal/iPhone-xcodeproj/AMPSmartClient/libAMPSmartClient.a(KeychainItemWrapper.o)
ld: 4 duplicate symbols for architecture i386

very strange duplicate symbol in xcode project

Projet SampleAppRef reference project B. Project B 's target is libyodo1SDK_SNS-AD-ALS-GMG.a .
When I build project SampleAppRef, It has this error, it tells me duplicate symbol:
ld: duplicate symbol _OBJC_METACLASS_$_AdViewAdapterDomobImpl in /Users/dengjian/project/SDK_iOS/trunk/Yodo1SDK/Prj/yodo1SDK/build-yodo1SDK_SNS-AD-ALS-GMG/Release-iphonesimulator/libyodo1SDK_SNS-AD-ALS-GMG.a(AdViewAdapterDoMob.o) and /Users/dengjian/project/SDK_iOS/trunk/Yodo1SDK/Prj/yodo1SDK/build-yodo1SDK_SNS-AD-ALS-GMG/Release-iphonesimulator/libyodo1SDK_SNS-AD-ALS-GMG.a(AdViewAdapterDoMob.o) for architecture i386
and The ld command is:
Ld build-SampleAppRef/Release-iphonesimulator/SampleApp.app/SampleApp normal i386
cd /Users/dengjian/project/SDK_iOS/trunk/Yodo1SDKSample/SampleApp
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.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 i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/dengjian/project/SDK_iOS/trunk/Yodo1SDKSample/SampleApp/build-SampleAppRef/Release-iphonesimulator -F/Users/dengjian/project/SDK_iOS/trunk/Yodo1SDKSample/SampleApp/build-SampleAppRef/Release-iphonesimulator -filelist /Users/dengjian/project/SDK_iOS/trunk/Yodo1SDKSample/SampleApp/build-SampleAppRef/SampleAppRef.build/Release-iphonesimulator/SampleAppRef.build/Objects-normal/i386/SampleApp.LinkFileList -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -all_load -lxml2 -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=40200 -framework SystemConfiguration -framework Security -framework QuartzCore -framework MobileCoreServices -framework MessageUI -framework MediaPlayer -framework MapKit -framework ImageIO -framework iAd -framework EventKit -framework CoreVideo -framework CoreTelephony -framework CoreMotion -framework CoreMedia -framework CoreLocation -framework CFNetwork -framework AVFoundation -framework AudioToolbox -lz -lstdc++ -lsqlite3 -liconv -framework UIKit -framework Foundation -framework CoreGraphics /Users/dengjian/project/SDK_iOS/trunk/Yodo1SDK/Prj/yodo1SDK/build-yodo1SDK_SNS-AD-ALS-GMG/Release-iphonesimulator/libyodo1SDK_SNS-AD-ALS-GMG.a -o /Users/dengjian/project/SDK_iOS/trunk/Yodo1SDKSample/SampleApp/build-SampleAppRef/Release-iphonesimulator/SampleApp.app/SampleApp
when I remove the reference project B, and build the project B single. Then add the yodo1SDK_SNS-AD-ALS-GMG.a to project SampleAppRef, it works well!
When I remove the duplicate file AdViewAdapterDoMob.h and AdViewAdapterDoMob.m from project project B, It works well too! and I can runs and call the code of AdViewAdapterDoMob.m .
project SampleAppRef self doesn't has any code of "AdViewAdapterDomobImpl". So why it has dumplcate symbol?
Can anybody give me some hints?
Try to clear log then press stop. after that clear the log again and quit xcode. restart mac and try again. See if that works.

Resources