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 的代码。

项目 SampleAppRef self 没有任何“AdViewAdapterDomobImpl”代码。那么为什么它有dumplcate符号呢?

有人可以给我一些提示吗?

4

1 回答 1

0

尝试清除日志然后按停止。之后再次清除日志并退出xcode。重新启动mac,然后重试。看看这是否有效。

于 2012-09-04T04:12:37.353 回答