我很难弄清楚这个问题。我的应用程序启用了iAds,它在iPhone(设备)和iPhone(模拟器)4.1上运行。我知道3.2版(iPad)不支持广告,所以,我对iad库做了一个弱链接。在build options=>linking=>其他链接标记中,我编写了iAd。在这之后,我得到一个生成错误:
Ld build/Debug-iphonesimulator/One2ThreePop.app/One2ThreePop normal i386
cd /Users/azamsharp/Documents/123Pop
setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk -L/Users/azamsharp/Documents/123Pop/build/Debug-iphonesimulator -F/Users/azamsharp/Documents/123Pop/build/Debug-iphonesimulator -filelist /Users/azamsharp/Documents/123Pop/build/One2ThreePop.build/Debug-iphonesimulator/One2ThreePop.build/Objects-normal/i386/One2ThreePop.LinkFileList -mmacosx-version-min=10.6 iAd -Xlinker -objc_abi_version -Xlinker 2 -framework CoreGraphics -framework Foundation -framework OpenGLES -framework QuartzCore -framework UIKit -framework AudioToolbox -framework OpenAL -lz -framework AVFoundation "-lcocos2d libraries" -weak_framework iAd -o /Users/azamsharp/Documents/123Pop/build/Debug-iphonesimulator/One2ThreePop.app/One2ThreePop
i686-apple-darwin10-gcc-4.2.1: iAd: No such file or directory
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1