nativelibs4java / BridJ

BridJ: blazing fast Java / C / C++ interop
https://code.google.com/archive/p/bridj/
Other
297 stars 77 forks source link

BridJ 0.7.0 hangs on getNativeLibrary, while BridJ 0.6.1 does just fine #76

Open astojanov opened 9 years ago

astojanov commented 9 years ago

Hi Olivier,

It seems that BridJ 0.7.0 has troubles loading certain native libraries, while BridJ 0.6.1 does not. The same behaviour I observe in version 0.6.2 also. Note that this does not happen with all libraries, just with specific ones, particularly with the MATLAB libmx.dylib. For example:

libraryDependencies += "com.nativelibs4java" % "bridj" % "0.7.0"
import org.bridj.BridJ
import org.scalatest.FunSpec
import java.util.logging.Level

class TestBridJ extends FunSpec {

  val mxPath = "/Applications/MATLAB_R2014b.app/bin/maci64/libmx.dylib"

  describe("loading the library") {
    BridJ.setMinLogLevel(Level.ALL)
    println("Loading libMx: " + mxPath)
    BridJ.getNativeLibrary(mxPath)
    println("Loading libMx: Done. ")
  }

}

Running this code makes BridJ hangs on getNativeLibrary. Do you know why this happens? Is there any easy fix or workaround?

Greetings, Alen

na-ka-na commented 8 years ago

Hey we also just hit this issue. Downgrading to 0.6.1 works. Is there some workaround in 0.7? Otherwise we can work with 0.6.1. But I cannot find documentation for it online. Could you point to the documentation or tell how to generate the documentation from the src download?