Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BridJ: Can't call method_name(const char* pz) with method_name(int i)  #482

@ShiranJ

Description

@ShiranJ

There are two methods in my C++ library like

 void bar1(const char* pz);
 void bar1(int i);

After generate java code with JNAerator it gives following output with native methods

 native public void bar1(Pointer<Byte > pz);
 native public void bar1(int i);

Now i execute above native methods with java as bellow

 myClass.bar1(Pointer.pointerToCString("hhhh"));
 myClass.bar1(999);

The Issue is every time it invoke the

void bar1(int i);

method. it not going to execute the method with "const char* pz" signature.
Is this a bug or is there an alternative way to over come this issue.
please help me

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions