You can see the actual path used by doing this in the repl: (System/getProperty "java.library.path")
I found it best to wrap native libs in a jar with this internal structure: /META-INF/MANIFEST.MF /native/linux/x86 /native/linux/x86_64 /native/macosx/x86 /native/macosx/x86_64 /native/windows/x86 /native/windows/x86_64 Then deploy the jar to your repo and refer to it as normal from project.clj, no need to set native path manually... On 22 March 2013 02:17, xumingmingv <xumingming64398...@gmail.com> wrote: > Have a look at this: > http://nakkaya.com/2010/04/05/managing-native-dependencies-with-leiningen/ > > 在 2013-3-22,上午6:55,Dave Snowdon <dave.snow...@gmail.com> 写道: > > I just upgraded from leiningen version 1.5.2 to 2.0.0 and noticed that the > native library path no longer seems to be set correctly. > > Here is my project file: > > (defproject naojure "0.1.0-SNAPSHOT" > :description "Clojure wrapper for Aldebaran Robotics java NAOQI binding. > Depends on the Aldebaran jar file being installed in a local repo and the > shared library being in the dynamic library load path" > :url "https://github.com/davesnowdon/naojure" > :repositories {"local" ~(str (.toURI (java.io.File. "maven_repository")))} > :native-path "native" > :dependencies [[org.clojure/clojure "1.4.0"] [com.aldebaran/jnaoqi > "1.14.0"]]) > > The native library is in a folder "native" at the top-level of the project > and the corresponding jar in a local repo also contained within the > leiningen project. > > If I run lein1 repl (I renamed the old leiningen script before upgrading) > then I can create instances of native classes from the repl, If I run lein > repl (leiningen 2.0.0) then I get the following error: > > CompilerException java.lang.UnsatisfiedLinkError: no jnaoqi in > java.library.path, compiling:(NO_SOURCE_PATH:1) > > Here are the exact values reported by lein version (running on Linux - > Fedora Core 14) > Leiningen 1.5.2 on Java 1.6.0_20 OpenJDK 64-Bit Server VM > & > Leiningen 2.0.0 on Java 1.6.0_20 OpenJDK 64-Bit Server VM > > I've looked online for issues related to leiningen and native path handling > but the bugs I found all related to leiningen 1 and have been supposedly > fixed. > > Can anyone suggest why the native library is not being located? > > thanks > > Dave > > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > > > -- > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > -- Karsten Schmidt http://postspectacular.com | http://toxiclibs.org | http://toxi.co.uk -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.