Unity 3.5 linker errors from RegisterMonoModules.cpp

So i updated to Unity 3.5, got the latest Xcode with IOS 5.0, and I’m getting hundreds of Mach-O linker errors (here’s an example error i get):

Undefined symbols for architecture armv7:
“__Z49Register_UnityEngine_RenderTexture_GetColorBufferv”, referenced from:
__Z32RegisterAllStrippedInternalCallsv in RegisterMonoModules.o

After hours and hours of research I found that what’s causing the linker errors are all the new functions/symbols added in the “RegisterAllStrippedInternalCalls()” method inside “RegisterMonoModules.cpp” file since Unity 3.4. It seams that Xcode cannot find any of these, and I don’t know why, or how to fix it.

I do have the latest IOS SDK installed (5.#) as well as the latest Xcode for Snow Leopard. I’m wondering if somehow the installation of either Xcode or Unity got corrupted?

Any help would be awesome, as I am stuck here :slight_smile:

Stephane

3 Answers

3

You sure you aren’t accidentally also building the simulator version? That’s usually what happens when you try and make a simulator build. I usually make sure the build for active platform setting is set to YES and only build the device version.

Yes 100% sure, see my answer above. Thanks for the suggestion anyways :)

Well as I suspected I had a corrupted installation of either Unity 3.5 or Xcode 4.2…after completely removing both programs (I made sure to use a program like “appCleaner” to uninstall the best I could), and re-installing both from fresh downloads of each program’s latest release, the build compiled just fine and all the linker errors are gone.

So, if anyone is having similar issues with linker errors related to “RegisterMonoModules” and you are pretty sure you have all the needed libraries linked, I would suggest completely uninstalling both Unity and Xcode and starting fresh from clean, new instals.

Phew…is all I can say haha

In my case, I had a few straggling build plugins left over from when I’d removed a plugin from my project, so keep that in mind as an alternative to “REINSTALL EVERYTHING”