Search Unity

Need help with libiPhone-lib.a

Discussion in 'iOS and tvOS' started by nbalexis1, Jul 8, 2013.

  1. nbalexis1

    nbalexis1

    Joined:
    Jul 21, 2011
    Posts:
    89
    Hi there, we have trouble using both prime31 and unity-scaleform4.2 and some other pliugins with Unity4.1.4f1

    it seems the libiPhone-lib.a (we asked prime31, they said it is not theirs) contains libz.a, libjpeg.a and libpng.a. Is there a work around?

    If we keep libiPhone-lib.a and libpng.a, there are many link errors showing duplicate symbols.

    If we delete libiPhone-lib.a, there are many link-errors showing many Undefined symbols.

    Undefined symbols for architecture armv7:
    "_mono_domain_get", referenced from:
    -[P31MonoBridge init] in libP31MonoBridge.a(P31MonoBridge.o)
    "_mono_domain_assembly_open", referenced from:
    -[P31MonoBridge findSecondMonoImage] in libP31MonoBridge.a(P31MonoBridge.o)
    -[P31MonoBridge findFirstMonoImage] in libP31MonoBridge.a(P31MonoBridge.o)
    "_mono_assembly_get_image", referenced from:
    -[P31MonoBridge findSecondMonoImage] in libP31MonoBridge.a(P31MonoBridge.o)
    -[P31MonoBridge findFirstMonoImage] in libP31MonoBridge.a(P31MonoBridge.o)
    "_mono_array_new", referenced from:
    -[P31MonoBridge monoArrayParamForByteArray:] in libP31MonoBridge.a(P31MonoBridge.o)
    "_mono_method_desc_search_in_image", referenced from:
    -[P31MonoBridge monoMethodForStaticUnityMethod:] in libP31MonoBridge.a(P31MonoBridge.o)
    "_mono_object_unbox", referenced from:
    -[P31MonoBridge callMonoMethodWithBoolReturn:] in libP31MonoBridge.a(P31MonoBridge.o)
    -[P31MonoBridge callMonoMethodWithIntReturn:] in libP31MonoBridge.a(P31MonoBridge.o)
    "_mono_get_byte_class", referenced from:
    -[P31MonoBridge monoArrayParamForByteArray:] in libP31MonoBridge.a(P31MonoBridge.o)
    "_mono_aot_register_module", referenced from:
    RegisterMonoModules() in RegisterMonoModules.o
    "UnityCreateUpdateExternalColorSurface(int, void*, unsigned int, unsigned int, int, int, bool)", referenced from:
    CreateUnityRenderBuffers_Unity(UnityRenderingSurface*) in GlesHelper.o
    "_gDefaultFBO", referenced from:
    ____Z24CreateUnityRenderBuffersP21UnityRenderingSurface_block_invoke in EveryplayGlesSupport.o
    PreparePresentRenderingSurface(UnityRenderingSurface*, EAGLContext*) in EveryplayGlesSupport.o
    SetupUnityDefaultFBO_Unity(UnityRenderingSurface*) in GlesHelper.o
    "UnityCreateUpdateExternalDepthSurface(int, void*, unsigned int, unsigned int, int, int, bool)", referenced from:
    CreateUnityRenderBuffers_Unity(UnityRenderingSurface*) in GlesHelper.o
    "UnityIsRenderingAPISupported(int)", referenced from:
    CreateContext(EAGLContext*) in EAGLContextHelper.o
    "UnityDestroyExternalColorSurface(int, void*)", referenced from:
    DestroyUnityRenderBuffers(UnityRenderingSurface*) in GlesHelper.o
    "UnityGetDPI()", referenced from:
    -[KeyboardDelegate positionInput:x:y:] in Keyboard.o
    "UnityIsOrientationEnabled(EnabledOrientation)", referenced from:
    ShouldAutorotateToInterfaceOrientation_DefaultImpl(objc_object*, objc_selector*, int) in UnityViewControllerBase.o
    SupportedInterfaceOrientations_DefaultImpl(objc_object*, objc_selector*) in UnityViewControllerBase.o
    "UnitySendTouchesMoved(NSSet*, UIEvent*)", referenced from:
    -[MainGLView touchesMoved:withEvent:] in iPhone_View.o
    "UnitySendTouchesEnded(NSSet*, UIEvent*)", referenced from:
    -[MainGLView touchesEnded:withEvent:] in iPhone_View.o
    "UnitySendTouchesBegin(NSSet*, UIEvent*)", referenced from:
    -[MainGLView touchesBegan:withEvent:] in iPhone_View.o
    "UnityRequestedScreenOrientation()", referenced from:
    CheckOrientationRequest() in iPhone_View.o
    ShouldAutorotateToInterfaceOrientation_DefaultImpl(objc_object*, objc_selector*, int) in UnityViewControllerBase.o
    SupportedInterfaceOrientations_DefaultImpl(objc_object*, objc_selector*) in UnityViewControllerBase.o
    ShouldAutorotate_DefaultImpl(objc_object*, objc_selector*) in UnityViewControllerBase.o
    "_mono_runtime_invoke", referenced from:
    -[P31MonoBridge callMonoMethod:withArgs:] in libP31MonoBridge.a(P31MonoBridge.o)
    -[P31MonoBridge callMonoMethod:withString:] in libP31MonoBridge.a(P31MonoBridge.o)
    -[P31MonoBridge callMonoMethod:withInt:] in libP31MonoBridge.a(P31MonoBridge.o)
    -[P31MonoBridge callMonoMethodWithStringReturn:] in libP31MonoBridge.a(P31MonoBridge.o)
    -[P31MonoBridge callMonoMethodWithBoolReturn:] in libP31MonoBridge.a(P31MonoBridge.o)
    -[P31MonoBridge callMonoMethodWithIntReturn:] in libP31MonoBridge.a(P31MonoBridge.o)
    -[P31MonoBridge callMonoMethod:] in libP31MonoBridge.a(P31MonoBridge.o)
    ...
    "_mono_ficall_flag", referenced from:
    RegisterMonoModules() in RegisterMonoModules.o
    "UnityParseCommandLine(int, char**)", referenced from:
    _main in main.o
    "_mono_dl_register_symbol", referenced from:
    RegisterMonoModules() in RegisterMonoModules.o
    "_mono_aot_only", referenced from:
    RegisterMonoModules() in RegisterMonoModules.o
    "UnitySetLastHeading(float, float, float, float, float, double)", referenced from:
    -[LocationServiceDelegate locationManager:didUpdateHeading:] in iPhone_Sensors.o
    "UnitySendTouchesCancelled(NSSet*, UIEvent*)", referenced from:
    -[MainGLView touchesCancelled:withEvent:] in iPhone_View.o
    "UnitySetScreenOrientation(ScreenOrientation)", referenced from:
    -[EveryplayUnity everyplayHidden] in EveryplayUnity.o
    __ZL31UpdateOrientationFromControllerP16UIViewController in iPhone_View.o
    OrientTo(int) in iPhone_View.o
    -[UnityViewController willRotateToInterfaceOrientation:duration:] in iPhone_View.o
    "_UnitySendMessage", referenced from:
    -[EveryplayUnity everyplayHidden] in EveryplayUnity.o
    -[EveryplayUnity everyplayRecordingStarted] in EveryplayUnity.o
    -[EveryplayUnity everyplayRecordingStopped] in EveryplayUnity.o
    -[EveryplayUnity everyplayThumbnailReadyAtFilePath:] in EveryplayUnity.o
    -[ImmobSDKCallBackProxy immobViewDidReceiveAd:] in ImmobManager.o
    -[ImmobSDKCallBackProxy immobView:didFailReceiveimmobViewWithError:] in ImmobManager.o
    -[ImmobSDKCallBackProxy emailNotSetupForAd:] in ImmobManager.o
    ...
    "UnityGLInvalidateState()", referenced from:
    -[EveryplayUnity everyplayHidden] in EveryplayUnity.o
    "UnitySendRemoteNotification(NSDictionary*)", referenced from:
    -[AppController application:didReceiveRemoteNotification:] in AppController.o
    -[AppController application:didFinishLaunchingWithOptions:] in AppController.o
    -[AppController(PushAdditions) application:didReceiveRemoteNotification:] in AppControllerPushAdditions.o
    "UnityIsCaptureScreenshotRequested()", referenced from:
    PreparePresentRenderingSurface(UnityRenderingSurface*, EAGLContext*) in EveryplayGlesSupport.o
    "SetLogEntryHandler(void (*)(LogType, char const*, void*))", referenced from:
    UnityInitTrampoline() in AppController.o
    "UnityCleanup()", referenced from:
    -[AppController applicationWillTerminate:] in AppController.o
    "_mono_method_desc_new", referenced from:
    -[P31MonoBridge monoMethodForStaticUnityMethod:] in libP31MonoBridge.a(P31MonoBridge.o)
    "UnitySetLastLocation(double, float, float, float, float, float)", referenced from:
    -[LocationServiceDelegate locationManager:didUpdateToLocation:fromLocation:] in iPhone_Sensors.o
    "UnityCaptureScreenshot()", referenced from:
    PreparePresentRenderingSurface(UnityRenderingSurface*, EAGLContext*) in EveryplayGlesSupport.o
    "UnityFinishRendering()", referenced from:
    RecreateMainView() in AppController.o
    OrientTo(int) in iPhone_View.o
    "UnityBlitToSystemFB(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)", referenced from:
    PreparePresentRenderingSurface(UnityRenderingSurface*, EAGLContext*) in EveryplayGlesSupport.o
    "UnitySendLocalNotification(UILocalNotification*)", referenced from:
    -[AppController application:didReceiveLocalNotification:] in AppController.o
    -[AppController application:didFinishLaunchingWithOptions:] in AppController.o
    "_mono_method_desc_free", referenced from:
    -[P31MonoBridge monoMethodForStaticUnityMethod:] in libP31MonoBridge.a(P31MonoBridge.o)
    "UnitySetInputScaleFactor(float)", referenced from:
    -[AppController prepareRunLoop] in AppController.o
    "UnityUse32bitDisplayBuffer()", referenced from:
    NeedRecreateMainView() in AppController.o
    RecreateMainView() in AppController.o
    "UnityUpdateDisplayList()", referenced from:
    -[DisplayManager updateDisplayListInUnity] in DisplayManager.o
    "UnitySendDeviceToken(NSData*)", referenced from:
    -[AppController application:didRegisterForRemoteNotificationsWithDeviceToken:] in AppController.o
    -[AppController(PushAdditions) application:didRegisterForRemoteNotificationsWithDeviceToken:] in AppControllerPushAdditions.o
    "UnityGetTargetFPS()", referenced from:
    -[AppController prepareRunLoop] in AppController.o
    "UnityInputProcess()", referenced from:
    -[AppController Repaint] in AppController.o
    "UnityUseAnimatedAutorotation()", referenced from:
    OnUnityReady() in iPhone_View.o
    "_mono_string_new", referenced from:
    -[P31MonoBridge monoStringParam:] in libP31MonoBridge.a(P31MonoBridge.o)
    "UnityLoadApplication()", referenced from:
    -[AppController prepareRunLoop] in AppController.o
    "UnitySendRemoteNotificationError(NSError*)", referenced from:
    -[AppController application:didFailToRegisterForRemoteNotificationsWithError:] in AppController.o
    -[AppController(PushAdditions) application:didFailToRegisterForRemoteNotificationsWithError:] in AppControllerPushAdditions.o
    "UnityPlayerLoop()", referenced from:
    RecreateMainView() in AppController.o
    -[AppController Repaint] in AppController.o
    -[UnityViewController didRotateFromInterfaceOrientation:] in iPhone_View.o
    "_mono_string_to_utf8", referenced from:
    -[P31MonoBridge callMonoMethodWithStringReturn:] in libP31MonoBridge.a(P31MonoBridge.o)
    "UnityGetRenderingResolution(unsigned int*, unsigned int*)", referenced from:
    NeedRecreateMainView() in AppController.o
    RecreateMainView() in AppController.o
    "UnityDestroyExternalDepthSurface(int, void*)", referenced from:
    DestroyUnityRenderBuffers(UnityRenderingSurface*) in GlesHelper.o
    "UnityHasRenderingAPIExtension(char const*)", referenced from:
    InitGLES() in GlesHelper.o
    "UnityDisableRenderBuffers(void*, void*)", referenced from:
    -[DisplayManager screenDidDisconnect:] in DisplayManager.o
    "UnityUse24bitDepthBuffer()", referenced from:
    NeedRecreateMainView() in AppController.o
    RecreateMainView() in AppController.o
    "UnityInitApplication(char const*)", referenced from:
    -[AppController startUnity:] in AppController.o
    "UnityPause(bool)", referenced from:
    -[AppController applicationDidBecomeActive:] in AppController.o
    -[AppController applicationWillResignActive:] in AppController.o
    -[EveryplayUnity everyplayShown] in EveryplayUnity.o
    -[EveryplayUnity everyplayHidden] in EveryplayUnity.o
    -[UnitySinaDelegate showSinaComposer:] in Jumpmaster_Sina.o
    ___38-[UnitySinaDelegate showSinaComposer:]_block_invoke in Jumpmaster_Sina.o
    -[EtceteraManager showViewControllerModallyInWrapper:] in EtceteraManager.o
    ...
    "UnityGetDesiredMSAASampleCount(int)", referenced from:
    NeedRecreateMainView() in AppController.o
    RecreateMainView() in AppController.o
    ld: symbol(s) not found for architecture armv7
    clang: error: linker command failed with exit code 1 (use -v to see invocation)


    If we delete -lz.-ljpeg,-lpng, there are link-errors:

    Undefined symbols for architecture armv7:
    "_png_longjmp", referenced from:
    __ZN9Scaleform6Render3PNGL17png_error_handlerEP14png_struct_defPKc in libgfx.a(PNG_ImageReader.o)
    "_png_set_longjmp_fn", referenced from:
    Scaleform::Render::pNG::FileWriter::Write(Scaleform::File*, Scaleform::Render::ImageData const, Scaleform::Render::ImageWriteArgs const*) const in libgfx.a(PNG_ImageReader.o)
    __ZN9Scaleform6Render3PNGL14GFxPngReadInfoEPNS1_10PngContextE in libgfx.a(PNG_ImageReader.o)
    Scaleform::Render::pNG::LibPNGInput:ecode(Scaleform::Render::ImageFormat, Scaleform::Render::ImageData*, void (*)(unsigned char*, unsigned char const*, unsigned long, Scaleform::Render:alette*, void*), void*) in libgfx.a(PNG_ImageReader.o)
    ld: symbol(s) not found for architecture armv7rror: linker command failed with exit code 1 (use -v to see invocation)

    We need help
    Thanks
     
  2. Graham-Dunnett

    Graham-Dunnett

    Administrator

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    libiPhone-lib.a is the Unity runtime library. It's needed to make an iOS game built with Unity work. This library includes PNG and JPG support, since Unity can read jpg textures from remote servers, and take screenshots and save them in PNG format. Based on the link messages you sent, it looks like Scaleform needs a different PNG library. You may want to contact Autodesk to ask how to make Scaleform work on iOS with Unity.
     
  3. TrialByFun

    TrialByFun

    Joined:
    Jun 23, 2009
    Posts:
    97
    Sometimes that error comes up with the prime31 plugins if the build processor script doesn't run, or runs in the wrong order or if there is a mismatch on how updated the plugins are.

    First thing to try usually is go " File/Build Settings/" Then hit "build and run" from there. This forces the prime build scripts to run again.
    Make sure to select "Replace" rather than "Append" on the build.

    If that still doesn't work, try building to a completely new directory ( to make sure no files have persisted )

    Let us know if that solved it for you ( or if it was a scaleform problem )
     
  4. victor-biosphera

    victor-biosphera

    Joined:
    Jun 21, 2010
    Posts:
    67
    Thank you TriaByFun! It solve my issue!