From: Dan K. <ka...@tx...> - 2007-03-20 21:34:57
|
I apologize for asking what I know is a FAQ. However, I've been reading the answers and haven't been able to piece together a working solution. I want to call a C function from Java that takes as an argument a pointer to a struct, representing an array of undefined length. From reading the documentation and the web archives, I understand that I want to use JAVA_ARRAYSOFCLASSES and/or typemaps in some combination. Any pointers to a complete example (or direct answers) would be greatly appreciated. Here's the simplified version of the header file for the C function I want to call. (Note that I am not the author of the header file, so don't have complete control over its form.) struct { float x; float y; } float2; typedef float2 Complex; extern "C" int someFunc(Complex *in, Complex *out, int length); Given that header file, how would one structure the .i file so that the function could be called in a reasonable manner from Java? Thanks in advance, -Dan ------- ka...@tx... |