nativelibs4java / JNAerator

JNAerator: native bindings generator for JNA / BridJ / Node.js
http://jnaerator.googlecode.com
504 stars 108 forks source link

JNAerator packages lib in "lib/darwin_universal" but at runtime it looks in "darwin" #95

Open lejon opened 9 years ago

lejon commented 9 years ago

Hi,

First, thanks for your efforts in JNAerator!

I'm having a problem using JNAerator on Mac OS X (Mavericks) using JNAerator 0.13 snapshot.

I'm running JNAerator this way:

'java -jar jnaerator/target/jnaerator-0.13-SNAPSHOT-shaded.jar -runtime JNA libFoo.dylib foo.h -mode StandaloneJar'

And I get a out.jar file where my 'dylib' is packaged in 'lib/darwin_universal' but when I run my Java code the runtime looks for the library in 'darwin':

Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'Foo': Native library (darwin/libFoo.dylib) not found

If I put my lib in a folder called 'darwin' and update the 'out.jar' thusly:

'jar uf out.jar darwin/libFoo.dylib'

it works.

Is there some configuration I have missed that fixes this?

MFAshby commented 6 years ago

I've just found and submitted a very similar issue, #115