Can't use classes from ios binding project

I'm trying to make simple Pjsip project. So I've built libs from sources, created Ios Binding project and Linked libs to this project. I also have referenced this ios binding project from the main xamarin ios project.
I had to use sharpie utility to create wrapper around 3 functions in my lib to make calls to them. And now ApiDefinition.cs file looks like this:
public static class CFunctions
[DllImport("DllName", EntryPoint="Foo")]
public static extern Foo()

I want to use methods from this ApiDefinition.cs file in my original Xamarin iOS Project, But I can not see this class from there.
What can I do to make it work?
Thanks in advance


Best Answer


  • epolonskiyepolonskiy RUMember

    @adamkemp Thank you a lot for your answer!
    But I still can't make my project work. May be you can help me?
    I added all of the Pjsip assemblies to my main Xamarin ios project, set build action to none. But After trying to rebuild the project I got a lot of errors (103 exactly) like "Native linking error: "operator delete(void*)", referenced from:" and "Native linking error: pj::Account::setDefault() in libpjsua2-apple-sdk_ios.a(account.o)".
    I think this is because my gcc_flags are wrong. Bu I can't figure it out.
    They are like: --gcc_flags "-L${ProjectDir} -framework CFNetwork -framework Foundation -framework UIKit -framework AudioToolbox -framework CoreGraphics -force_load ${ProjectDir}/libg7221codec-apple-sdk_ios.a (and all other 14 assemblies)"
    Can you please help me?

  • adamkempadamkemp USInsider, Developer Group Leader mod

    I followed up in your other thread.

Sign In or Register to comment.