- Home /
Undefined symbols for Unity Plugin written in C++ when compiled to XCode
Hello,
I wrote a C++ application in iOS and compiled it into an archive file (.a) for iOS and the simulator. I also had a universal archive (for both simulator and device) made which works in other XCode apps.
I tried to import it into Unity as a plugin. I wrapped the C++ code with a set of cpp functions enclosed in extern "C" {...} and then wrote a C# wrapper for those functions as well. I put both the cpp with the extern functions and the archieve in the Assets/Plugins/iOS/ folder. It all builds on the Unity side and when it gets to XCode, I see both the library and the cpp file get copied into the resulting XCode project, but when I try to compile inside XCode, it can't find the functions inside the library.
Errors: ][1]
I can't figure why this is happening. The library that has these objects and functions also shows up in the "Linked Frameworks and Libraries" but it can't find the functions. I'm pretty sure the .a is also one that was compiled for the device (armv7).
Anyone have any idea? Would appreciate it.
Thanks!
I have the same issue. Did you manage to get this working?
Your answer
Follow this Question
Related Questions
Have to "Replace" iOS project every build because of Linker Errors 0 Answers
How would I debug a Unity-plugin from XCode? 3 Answers
Realtime C++ Unity Interaction 0 Answers
C++ Plugin for mipmapping and JPG encoding: viability 0 Answers
How do I get maximum performance on extremely heavy calculations? 1 Answer