Using Java / JNI on Cygwin

前端 未结 3 943
灰色年华
灰色年华 2020-12-12 01:59

I am entering into Java world just now. I am facing problem when I try to compile sample program for Calling C from Java.

I wanted to try the sample code for JNI (W

3条回答
  •  悲哀的现实
    2020-12-12 02:28

    I couldn't get JNI to work with Cygwin's g++ -- that induces a dependency on cygwin1.dll, which clashes with the JNI mechanism, causing a crash. The -mno-cygwin flag is no longer supported. But using /bin/x86_64-w64-mingw32-g++.exe fixed the problem for me.

提交回复
热议问题