代码之家  ›  专栏  ›  技术社区  ›  azamsharp

iPhone模拟器在iPad上构建错误,在iPhone模拟器和iPhone设备上运行良好

  •  1
  • azamsharp  · 技术社区  · 14 年前

    我很难弄清楚这个问题。我的应用程序启用了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
    
    1 回复  |  直到 14 年前
        1
  •  2
  •   Mr. Berna    14 年前

    在调用IAD库之前,在运行时检查是否存在IAD库,包括用IAD和IAD横幅加载NIB?你需要绕过iPad上的iAd。