I’m having a weird issue. I’m trying to build a project on iOS through Xcode and this error pops up :
This happens after installing a plugin into the project (MoPub v3.8.0). I removed all other plugins and libraries from the Unity project in case it was a conflict between some of those but I still get the same error. Note that installing MoPub’s plugin in a new project builds properly. This puzzles me because it seems to be a conflict between two libraries handled by Unity itself so I have no idea how to solve this and MoPub says that it doesn’t come from their plugin (of course).
Do you guys have any idea on what could cause this, what I could do or where I could look to fix that ? Any help is really appreciated I’ve been on this one for days.
We are also having this issue, but we are not using that plugin. This issue has appeared for us since upgrading to Unity 5.2 from Unity 5.1.
Having investigated, it seems that the RegisterStaticallyLinkedModules function is indeed defined in the RegisterMonoModules.cpp file and the RegisterStaticallyLinkedModules.cpp file (which is built into the libiphone-lib.a library). Both the RegisterMonoModules.cpp file and the libiphone-lib.a library are part of the Unity 5 install and copied into the project’s Libraries folder during the build.
The RegisterStaticallyLinkedModules function in the library is exposed in a header file, but the one in RegisterMonoModules.cpp seem to not be exposed at all, and not called internally either, so I’m not sure why it’s there in the first place. I tried commenting out the one in the RegisterMonoModules.cpp, and the build was successful.
I guess a short term solution (until we hear back from Unity) is to comment out the RegisterStaticallyLinkedModules in the RegisterMonoModules.cpp in the Unity 5 install folder, so that it’s not a per-project fix (hack).
Edit: ok it seems like the RegisterMonoModules.cpp in the Unity 5 install folder does not contain the RegisterStaticallyLinkedModules fucntion, so it must be auto generated, ie RegisterStaticallyLinkedModules is added somehow. So for now, the hack fix has to be done in the Xcode project, which is difficult for us as we have an automated build system
Well I didn’t manage to do Colin4T2’s solution. On My side the RegisteredMonoModules.cpp file generated is unreadable or at least I didn’t manage to read it properly.
What I ended up doing was switch from the Mono2x scripting backend to IL2CPP. I’m not sure why it works but it does. For me the error really only happens when I have this plugin in so I’m really wondering if it’s a conflict between the plugin’s library and Unity’s, maybe the plugin isn’t updated to some latest change or something (I did contact them but they don’t care). Do you guys have other libraries in your project that could cause that ?