Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing lwjgl in Leiningen/Clojure
    text
    copied!<h2>Solution</h2> <pre><code>(1) (println (. System getProperty "java.library.path")) </code></pre> <p>This gives me a list of places java looks for native extensions.</p> <p>Then, I took the lwjgl native extensions, and put them there.</p> <h2>Things that didn't work for me (probably because I used them incorrectly)</h2> <pre><code>(*) setting :native-path (*) setting :native-dependencies </code></pre> <h2>Problem</h2> <p>My setup:</p> <pre><code>(lein deps; echo "====="; cat project.clj; echo "====="; cat src/main.clj; echo "====="; lein repl) &amp;&gt; log </code></pre> <p>contents of "log"</p> <pre><code> Copying 10 files to /Volumes/ramdisk/fail/lib ===== (defproject mincase "0.0.1" :dependencies [[org.clojure/clojure "1.4.0"] [org.lwjgl.lwjgl/lwjgl "2.8.2"] ] :repositories {"local" "/Users/x/z/maven_repo"} :jvm-opts ["-Xms4g" "-Xmx4g"] :repl-init main ) ===== (ns main (:import org.lwjgl.opengl.Display)) ===== REPL started; server listening on localhost port 31235 UnsatisfiedLinkError no lwjgl in java.library.path java.lang.ClassLoader.loadLibrary (ClassLoader.java:1860) clojure.core=&gt; </code></pre> <p>Note -- I had already done a "lein deps", so the lwjgl library has been pulled into maven. What I don't understand are:</p> <pre><code>(*) how do I get access to lwjgl from Clojure? (*) more importantly, how do I debug which step this whole thing has gone wrong at? </code></pre> <p>$ find lib</p> <pre><code>lib lib/clojure-1.4.0.jar lib/jinput-2.0.5.jar lib/jinput-platform-2.0.5-natives-linux.jar lib/jinput-platform-2.0.5-natives-osx.jar lib/jinput-platform-2.0.5-natives-windows.jar lib/jutils-1.0.0.jar lib/lwjgl-2.8.2.jar lib/lwjgl-platform-2.8.2-natives-linux.jar lib/lwjgl-platform-2.8.2-natives-osx.jar lib/lwjgl-platform-2.8.2-natives-windows.jar </code></pre> <p>So it appears that lwjgl has been pulled in.</p> <p>What are the steps I should try to figure out which step I went wrong on?</p> <p>Thanks!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload