I am trying to wrap some legacy code for use in Java and I was quite happy to see that Swig was able to handle the header file and it generate a great wrapper that almost wo
Perhaps this part of the SWIG documentation is helpful:
A common problem in some C programs is handling parameters passed as simple pointers or references. For example:
void add(int x, int y, int *result) { *result = x + y; }[...]
The typemaps.i library file will help in these situations. For example:
%module example %include "typemaps.i" void add(int, int, int *OUTPUT);
There's also a section on wrapping arrays.
I'm sorry this isn't a ready-made, complete answer. SWIG is mind-bending at times.