[mono-android] Help with .so and java source
Goncalo Oliveira
goncalo at minkan.net
Mon Feb 20 09:54:23 UTC 2012
I'm kind of out-of-date with this, maybe someone can give he a hand...
I'm "translating" the c header into c# in order to import the methods from
the .so library. The this is that mangled names make this a bit messy to
maintain; for example:
int Msg_IsConnected() => mangled name
=> Java_com_alk_sdk_AlkMsg_Msg_1IsConnected
I used objdump to retrieve these names, but... maybe there's another way to
do this with the DllImport parameters?
Cheers
On 18 February 2012 15:39, Jonathan Pryor <jonp at xamarin.com> wrote:
> On Feb 18, 2012, at 9:11 AM, Goncalo Oliveira wrote:
> > I tried the dllimport route, and I managed to invoke a few methods. Do
> you believe this way is better than using jni?
>
> Yes, DllImport will be more efficient than using JNI. It'll also provide a
> degree of portability with other .NET platforms (assuming they provide the
> same C API).
>
> - Jon
>
>
--
Gonçalo Oliveira
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/monodroid/attachments/20120220/d4dc8be7/attachment.html>
More information about the Monodroid
mailing list