Hello,
I've a c library with this function
libbest.so
double *best(double *x, double *y, double t);
I'm trying to use it so
----------------------------------------------------------------
/*iBest.java*/
import com.sun.jna.*;
public interface iBest extends Library{
iBest INSTANCE = iBest
Native.loadLibrary("best", iBest.class);
double[] best(double[] x, double[] y, double t);
}
----------------------------------------------------------------
Sure I'm taking a mistake because I get
Exception in thread "AWT-EventQueue-0"
java.lang.IllegalArgumentException: Unsupported return type class [D
at com.sun.jna.Function.invoke(Function.java:307)
at com.sun.jna.Function.invoke(Function.java:176)
at com.sun.jna.Library$Handler.invoke(Library.java:144)
at $Proxy0.best(Unknown Source)
...
Can anybody help me? Thanks in advance.