fix library name of jni

dev
MITSUNARI Shigeo 9 years ago
parent 9b32ca0a1f
commit 3e8dbe1b50
  1. 4
      java/Makefile
  2. 5
      java/MclTest.java

@ -9,12 +9,12 @@ else
CFLAGS+=-z noexecstack
LIB+=-lrt
endif
CFLAGS+= -shared -fPIC $(JAVA_INC)
CFLAGS+= -shared -fPIC $(JAVA_INC) -Wno-strict-aliasing
PACKAGE_NAME=com.herumi.mcl
PACKAGE_DIR=$(subst .,/,$(PACKAGE_NAME))
TARGET=../bin/mcl_if_wrap.$(LIB_SUF)
TARGET=../bin/libmcl_if_wrap.$(LIB_SUF)
JAVA_EXE=cd ../bin && LD_LIBRARY_PATH=./:$(LD_LIBRARY_PATH) java -classpath ../java
all: $(TARGET)

@ -8,7 +8,10 @@ import com.herumi.mcl.*;
*/
public class MclTest {
static {
System.loadLibrary("mcl_if_wrap");
String lib = "mcl_if_wrap";
String libName = System.mapLibraryName(lib);
System.out.println("libName : " + libName);
System.loadLibrary(lib);
}
public static void assertEquals(String msg, int x, int y) {
if (x == y) {

Loading…
Cancel
Save