Hey,
Daniel Korzekwa wrote:
>
> Using brid-0.7.0.jar. I managed to make bridj working for calling c from
> Scala only by setting @Library("mylibrary.so") and putting mylibrary.so
> file in the root scala project directory.
>
> Is it possible to configure bridj to look for a native library under a
> classpath dir?, e.g. $project_dir/target or to configure the directory for
> native libs in some way?.
>
Yes, you can call BridJ.addLibraryPath(path.getCanonicalPath) to set the
path for the main library.
You can also call BridJ.getNativeLibrary(libName, libFile) to force BridJ
to load other libraries that your lib depends on from specific files
(otherwise it may extract them to a temprorary directory).
Do both before calling BridJ.register() and you get control over where it
loads libraries from.
Also if I change Library("mylibrary.so") to Library("mylibrary") then bridj
> fails with:
>
I am not sure, I have just looked at code I have for this, and while I am
using windows dlls, I don't actually have the .dll suffix for the main
library (I do have it for the ones it depends on, though).
HTH,
M.
--
You received this message because you are subscribed to the Google Groups
"NativeLibs4Java" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.