Reputation: 9821
I have an Obj-C native library libCMX.a
that I wish to create C# bindings for, but the library has multiple dependencies, e.g. JASidePanels with a couple of .m
and .h
files.
How can I include these in the Xamarin binding project so they are linked correctly into the resulting DLL?
I know I can specify Frameworks
in the LinkWith
attribute, but how do I include pure code dependencies in form of main and header files?
EDIT: The library is proprietary (Cisco CMX SDK), I do not have access to the source code.
EDIT 2: The library is part of a framework (CMX.framework), from which I have extracted the extensionless archive and renamed it to libCMX.a to match default library naming for Xamarin.
Upvotes: 3
Views: 1791
Reputation: 32694
You can reference multiple native libraries in your binding project, the combined set of libraries will be linked into your application.
You only need to surface the APIs for libraries that you want to invoke/call. For the rest, just include the binary dependencies.
Upvotes: 6
Reputation: 5234
You will need to compile those into the static library (libMyLibrary.a) you are binding to C#.
Upvotes: 1