- Home /
What to do with "Undefined symbols for architecture ..." in Xcode for IL2CPP project?
I am trying to switch my project over to build with IL2CPP for iOS. However when I try to build the project from Xcode I get this error:
Undefined symbols for architecture arm64:
"Register__ShaderVariant_Internal_CheckVariant()", referenced from:
RegisterAllStrippedInternalCalls() in UnityICallRegistration.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am using Unity 5.0.2f1, and have tried updating up to 5.0.2p4 and the error persists.
This might be a bug related to an interaction between IL2CPP and stripping. What is the "Stripping Level" set to in the player settings? Please try with it set to a value of "Disabled" if it is not already.
The stripping is set to disabled and it still happens -- I am able to build the project if I comment out the two offending lines in UnityICallRegistration.cpp - not sure if that is safe though :/ but it doesn't seem to be crashing at least...
Can you submit a bug report and include a project to reproduce the issue? This certainly sounds like a bug we should correct. You are probably safe to comment out that code, as long at the parts of the engine that are not registered correctly are not used at runtime (which can be difficult to tell, unfortunately). Our best approach it to correct the bug.