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
当我删除参考项目B,并构建项目B单。然后将yodo1SDK_SNS-AD-ALS-GMG.a添加到项目SampleAppRef中,它运行良好!
当我从项目项目B中删除重复文件AdViewAdapterDoMob.h和AdViewAdapterDoMob.m时,它也运行良好!我可以运行并调用AdViewAdapterDoMob.m的代码。
项目SampleAppRef self没有任何“AdViewAdapterDomobImpl”代码。那为什么它有dumplcate符号?
有人可以给我一些提示吗?
答案 0 :(得分:0)
尝试清除日志然后按停止。之后再次清除日志并退出xcode。重启mac并再试一次。看看是否有效。