bcdev / jpy

A bi-directional Python-Java bridge used to embed Java in CPython or the other way round.
Apache License 2.0
187 stars 37 forks source link

Compilation error on MacOS and solution #190

Open huayue21 opened 3 years ago

huayue21 commented 3 years ago

Compilation error: src/main/c/jni/org_jpy_PyLib.c

I compiled on Mac and gcc standard c99 reports error. So I put a line of declaration of void JPy_free(void* unused); in the file src/main/c/jni/org_jpy_PyLib.c and this results further error since the calling on line 333 is JPy_free(); does not comply with the form of the declaration. I then change it to JPy_free(NULL); and it works for me.

Not sure what happens on Windows 10 and other compilers.