- Home /
il2cpp code generation issue
Hello everyone,
I'm using Unity 5.1.1p4 and have been having an issue, building for iOS (SDK 8) in a il2cpp instruction on the XCode project.
Every time I make a build, the il2cpp generates this code, in the file Build_Generics_4.cpp:
...
NullCheck((AmazonServiceException_t400 *)(*(&V_5)));
AmazonServiceException_set_StatusCode_m2109((AmazonServiceException_t400 *)(*(&V_5)), (int32_t)L_55, /*hidden argument*/NULL);
Object_t * L_56 = V_5;
il2cpp_codegen_raise_exception(L_56);
...
But by definition the method il2cpp_codegen_raise_exception has this signature:
il2cpp_codegen_raise_exception (Il2CppCodeGenException *ex)
and Il2CppCodeGenException expects a string type as input.
So every time, as a workaround, I have to convert the L_56, an integer, to string...
std::stringstream ss;
ss << L_56;
std::string str;
ss >> str;
il2cpp_codegen_raise_exception(il2cpp_codegen_get_not_supported_exception(str.c_str()));
Do anyone have an idea of whats causing this. This looks like a il2cpp bug.
Thank you in advance
Answer by JoshPeterson · Jul 21, 2015 at 10:30 AM
Yes this is a known bug in IL2CPP. It will be corrected in 5.1.2p1, which should be available this week.
Your answer
![](https://koobas.hobune.stream/wayback/20220611232155im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How do I change optimization setting to -O0? 0 Answers
What to do with "Undefined symbols for architecture ..." in Xcode for IL2CPP project? 0 Answers
IL2CPP Crash on OpenGL graphics device creation 2 Answers
The app is continually stopping in IOS 0 Answers
Can`t compile project in Xcode when scripting backend is set IL2CPP 1 Answer