Pass array to C function with emscripten
问题 I think this question is similar to this one and I used most of it's answer for my problem, but I still have issues: First the C code: #include <stdio.h> extern "C" { void fillArray(int* a, int len) { for (int i = 0; i<len; i++) { a[i] = i*i; } for (int j = 0; j < len; ++j) { printf("a[%d] = %d\n", j, a[j]); } } } I'm passing a pointer to an array to my C function and fill it with some information. I compile this code with emcc -o writebmp.js dummyCode\cwrapCall.cxx -s EXPORTED_FUNCTIONS="['