简体   繁体   中英

How to make sure whether my static library works fine

We are developing a Xamarin iOS application by making use of SUP MBOs. We have generated the code in Objective C and in order to access it from C# code base(Xamarin), this generated code should be bundled as a static library (.a file) with some SUP specific static libraries and SUP header classes. We are able to create universal static library file(.a file) with help of Build fat static library (device + simulator) using Xcode and SDK 4+

Now my question is how to make sure whether the universal static library file which we have created is working or not?

We have created a sample static library file by just implementing a add method and were able to access it through C# code(using Xamarin) but we are getting this error -## MT5211: Native linking failed, undefined Objective-C class: _OBJC_CLASS ## when using SUP generated code. we are giving all correct values to all properties in build setting of Xcode "other linker flags", "library search path", "header search path" but I have no idea how we can go ahead with this. We are not sure whether we are missing something or in wrong path?

The best option is to create a Binding project for the native library (and a corresponding test application that exercises the binding project to make sure it works).

If you have any problems (build/linker/runtime errors), we'll need to see the header file, the binding code you've created and the full build output in order to diagnose the problem properly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM