1
votes

I have a game that I created in Unity 5 on my pc for Android and it works fine. Then I moved my project to mac, switched the platform to iOS, and tried to build it for iOS 10 and for a iphone 5s Device, now I'm getting the error "Undefined symbols for architecture arm64" for couple days. It's an Apple Mach-O Linker error, the full error log is this:

    Undefined symbols for architecture arm64:
  "_SetPostProcessingLevel", referenced from:
      _MobileMovieTexture_SetPostProcessingLevel_m340134882 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieTexture_SetPostProcessingLevel_m340134882)
  "_GetNativeTextureContext", referenced from:
      _MobileMovieTexture_GetNativeTextureContext_m3013707638 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_Update_m229835833 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieTexture_GetNativeTextureContext_m3013707638)
  "_GetNativeCrHandle", referenced from:
      _MobileMovieTexture_GetNativeCrHandle_m1346850547 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_AllocateTexures_m1194377895 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieTexture_GetNativeCrHandle_m1346850547)
  "_GetNativeYHandle", referenced from:
      _MobileMovieTexture_GetNativeYHandle_m122341787 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_AllocateTexures_m1194377895 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieTexture_GetNativeYHandle_m122341787)
  "_SetTargetDisplayDecodeTime", referenced from:
      _MobileMovieTexture_SetTargetDisplayDecodeTime_m2803437558 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_Update_m229835833 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieTexture_SetTargetDisplayDecodeTime_m2803437558)
  "_GetUploadedFrameTime", referenced from:
      _MobileMovieTexture_GetUploadedFrameTime_m767216509 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieTexture_GetUploadedFrameTime_m767216509)
  "_GetTargetDecodeFrameTime", referenced from:
      _MobileMovieTexture_GetTargetDecodeFrameTime_m1944055036 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieTexture_GetTargetDecodeFrameTime_m1944055036)
  "_GetDecodedFrameTime", referenced from:
      _MobileMovieTexture_GetDecodedFrameTime_m4082499723 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_Update_m229835833 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieTexture_GetDecodedFrameTime_m4082499723)
  "_GetNativeCbHandle", referenced from:
      _MobileMovieTexture_GetNativeCbHandle_m3890980099 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_AllocateTexures_m1194377895 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieTexture_GetNativeCbHandle_m3890980099)
  "_HasFinished", referenced from:
      _MobileMovieTexture_HasFinished_m2425687786 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_Update_m229835833 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieTexture_HasFinished_m2425687786)
  "_UnitySetGraphicsDevice", referenced from:
      _MobileMovieManager_UnitySetGraphicsDevice_m1104447396 in Bulk_Assembly-CSharp_2.o
      _MobileMovieManager_Awake_m3392935013 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieManager_UnitySetGraphicsDevice_m1104447396)
  "_CreateContext", referenced from:
      _MobileMovieTexture_CreateContext_m2297476272 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_Start_m699961940 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieTexture_CreateContext_m2297476272)
  "_GetUVHeight", referenced from:
      _MobileMovieTexture_GetUVHeight_m1829143090 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_Open_m874313018 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieTexture_GetUVHeight_m1829143090)
  "_GetUVStride", referenced from:
      _MobileMovieTexture_GetUVStride_m3556923968 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_Open_m874313018 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieTexture_GetUVStride_m3556923968)
  "_GetYHeight", referenced from:
      _MobileMovieTexture_GetYHeight_m50893772 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_Open_m874313018 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieTexture_GetYHeight_m50893772)
  "_Seek", referenced from:
      _MobileMovieTexture_set_playPosition_m2716267000 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_Seek_m2949269240 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_Update_m229835833 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: __Z17FMOD_OS_File_SeekPvj, _UNITY_FT_Stream_Seek , __ZN4FMOD27FMOD_OggVorbis_SeekCallbackEPvxi , __Z14FMOD_FILE_SeekPvjS_ , _SeekOrigin_t4120335598_1_0_0 , _SeekOrigin_t4120335598_0_0_0 , _FMOD_Sound_SeekData , _MemoryStream_Seek_m3823297180_MetadataUsageId , _UnmanagedMemoryStream_Seek_m2466946404_MetadataUsageId , _FileStream_Seek_m4271693569 , _WebConnectionStream_Seek_m4285092954 , _SslStream_Seek_m1475566206_MetadataUsageId , _FileStream_Seek_m4271693569_MetadataUsageId , _SslStreamBase_Seek_m3066335689 , _SslStream_Seek_m1475566206 , _NetworkStream_Seek_m2612975724_MetadataUsageId , _DeflateStream_Seek_m4251260626_MetadataUsageId , _GZipStream_Seek_m2685013297 , _XmlInputStream_Seek_m162895276 , _NetworkStream_Seek_m2612975724 , _SeekOrigin_t4120335598_0_0_32854 , _UnmanagedMemoryStream_Seek_m2466946404 , _MobileMovieTexture_Seek_m2949269240 , _FtpDataStream_Seek_m1228510272_MetadataUsageId , _WebConnectionStream_Seek_m4285092954_MetadataUsageId , _SslStreamBase_Seek_m3066335689_MetadataUsageId , _TlsStream_Seek_m484817355 , _FtpDataStream_Seek_m1228510272 , _MobileMovieTexture_get_SeekKeyFrame_m756860947 , _NullStream_Seek_m57934742 , _MonoIO_Seek_m1717806132 , _DeflateStream_Seek_m4251260626 , _MobileMovieTexture_set_SeekKeyFrame_m3052084234 , _MemoryStream_Seek_m3823297180 )
  "_GetYStride", referenced from:
      _MobileMovieTexture_GetYStride_m1778674650 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_Open_m874313018 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieTexture_GetYStride_m1778674650)
  "_GetPicY", referenced from:
      _MobileMovieTexture_GetPicY_m328897995 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_Open_m874313018 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieTexture_GetPicY_m328897995)
  "_CloseStream", referenced from:
      _MobileMovieTexture_CloseStream_m889507146 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_Stop_m992823538 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieTexture_CloseStream_m889507146)
  "_GetPicX", referenced from:
      _MobileMovieTexture_GetPicX_m839432172 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_Open_m874313018 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieTexture_GetPicX_m839432172)
  "_GetPicHeight", referenced from:
      _MobileMovieTexture_GetPicHeight_m3590182171 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_Open_m874313018 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieTexture_GetPicHeight_m3590182171)
  "_UnityRenderEvent", referenced from:
      _MobileMovieManager_UnityRenderEvent_m2832240770 in Bulk_Assembly-CSharp_2.o
      _U3CDecodeCoroutineU3Ec__Iterator2D_MoveNext_m1856974098 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieManager_UnityRenderEvent_m2832240770)
  "_OpenStream", referenced from:
      _MobileMovieTexture_OpenStream_m1251301461 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_Open_m874313018 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _InternalConfigurationHost_OpenStreamForRead_m3069798203, _MobileMovieTexture_OpenStream_m1251301461 , _InternalConfigurationHost_OpenStreamForRead_m3069798203_MetadataUsageId )
  "_GetDuration", referenced from:
      _MobileMovieTexture_get_duration_m2740121488 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_GetDuration_m3119351611 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _Playable_GetDurationInternal_m31704136, _ColorTween_GetDuration_m1400665524 , __Z49Playable_CUSTOM_INTERNAL_CALL_GetDurationInternalR9HPlayable , _MobileMovieTexture_GetDuration_m3119351611 , _FloatTween_GetDuration_m2290037293_AdjustorThunk , _Playables_GetDurationValidated_m2822701863 , _Playable_INTERNAL_CALL_GetDurationInternal_m2671113415 , __Z85Register_UnityEngine_Experimental_Director_Playable_INTERNAL_CALL_GetDurationInternalv , _FloatTween_GetDuration_m2290037293 , _ColorTween_GetDuration_m1400665524_AdjustorThunk )
  "_GetAspectRatio", referenced from:
      _MobileMovieTexture_get_AspectRatio_m1332767376 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_GetAspectRatio_m1467253595 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieTexture_GetAspectRatio_m1467253595)
  "_GetPicWidth", referenced from:
      _MobileMovieTexture_GetPicWidth_m2259543134 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_Open_m874313018 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieTexture_GetPicWidth_m2259543134)
  "_GetVideoFPS", referenced from:
      _MobileMovieTexture_get_FPS_m1346749615 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_GetVideoFPS_m504717089 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieTexture_GetVideoFPS_m504717089)
  "_DestroyContext", referenced from:
      _MobileMovieTexture_DestroyContext_m2848445103 in Bulk_Assembly-CSharp_2.o
      _MobileMovieTexture_OnDestroy_m3443983437 in Bulk_Assembly-CSharp_2.o
     (maybe you meant: _MobileMovieTexture_DestroyContext_m2848445103)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I searched everywhere and tried everything i could, but still had no luck. Until now I have tried:

  1. Changing architectures(armv7 and arm64 and standard architectures)
  2. Changing "Build active architecture only" to no
  3. Changing "Dead code stripping" to no
  4. Adding $(inherited) to "Other Linker Flags"
  5. Adding "Security" and "SystemConfiguration" Frameworks to Build Phases
  6. Enabling "Symlink Unity Libraries" in Unity Player Setting
  7. Disabling "bitcode" and enabling "Preserve Private External Symbols"

here is my build settings screenshot: BuildSettings1, BuildSettings2,

1
unity which Version using?Sudheer Kolasani
My unity version is 5.4.1, but the main project was in 5.3.4 then I moved the project to Mac and newer version of Unity.Morteza Malek Makan
update your 3rd party frameworksSudheer Kolasani
Add the path to the library to "Library Search Paths".Sudheer Kolasani
Thank you for your comment, but I don't know which framework or files causing this error. so I don't know which framework should be updated.Morteza Malek Makan

1 Answers

1
votes

This type of error usually means that the managed code in the project has an extern static method in C# named SetPostProcessingLevel. That method should be a native method which is part of a native static library in the project.

IL2CPP requires that all extern static methods be resolved a link time. If they are not found by the native linker, errors like this will occur.

It might be the case that these methods should not exist for an iOS build. If so, the extern static methods where they are defined in C# code should be surrounded with #if !UNITY_IOS statements to avoid compiling them.