Вот мои файлы .i и .cpp:
my_module.i
Код: Выделить всё
%module mymodule
%inline %{
extern void compress_buffer_to_file(unsigned char *buffer, char *ofname);
%}
Код: Выделить всё
void compress_buffer_to_file(unsigned char *buffer, char *ofname){
.........
}
Код: Выделить всё
public static void compress_buffer_to_file(SWIGTYPE_p_unsigned_char buffer, String ofname) {
my_moduleJNI.compress_buffer_to_file(SWIGTYPE_p_unsigned_char.getCPtr(buffer), ofname);
}
Я безуспешно пытался использовать карту типов.
Подробнее здесь: https://stackoverflow.com/questions/335 ... -java-to-c
Мобильная версия