2012-09-03 92 views
0

PROJET SampleAppRef參考項目B.項目B的目標是libyodo1SDK_SNS-AD-ALS-GMG.a。很奇怪的重複符號

當我建項目SampleAppRef,它有這個錯誤,它告訴我重複的符號:

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 

和ld命令是:

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 
  1. 當我刪除參考項目B,並建立項目B單。然後添加yodo1SDK_SNS-AD-ALS-GMG.a到項目SampleAppRef,它工作的很好!

  2. 當我刪除從工程項目B中的重複文件AdViewAdapterDoMob.h和AdViewAdapterDoMob.m,它的工作原理也很好!我可以運行並調用AdViewAdapterDoMob.m的代碼。

project SampleAppRef self沒有任何「AdViewAdapterDomobImpl」代碼。那麼,爲什麼它會傾倒符號?

任何人都可以給我一些提示嗎?

回答

0

嘗試清除日誌然後按停止。之後,再次清除日誌並退出xcode。重新啓動mac並再試一次。看看是否有效。