Search code examples
objective-cundefinedjailbreaksymbols

Undefined symbols for architectures armv7: "_MGCopyAnswer", Can't Solve


So, I'm creating a jailbreak app and I'm trying to use libMobileGestalt.dylib in the app. I link the file correctly and add the header and call MGCopyAnswer. The problem is, I get this error:

Undefined symbols for architectures armv7: "_MGCopyAnswer", referenced from:

This error only occurs when the app is built with armv7 architecture. It doesn't occur when arm64 architecture is used. I know that this occurs due to the dylib being built with the arm64 architecture, but I really want it to work with the armv7 architecture so that the app would be compatible with a larger range of devices.

Is there a place from which I can obtain the armv7 architecture version of the dylib, or be able to build it again with that architecture included? Is there any solution to this that anyone knows? Thank you for helping in advance.


Solution

  • I found out the solution. The reason I was getting an error was that I was linking that dylib to a static library I was creating, which isn't possible, so I had to also link this dylib to all the projects I created that use the static library (which in turn uses the dynamic library). Hope this makes sense :P And thank you all for trying to help :)