Fork me on GitHub
#clojure-gamedev
<
2016-08-25
>
idiomancy20:08:23

Anyone have experience using libgdx with clojure? I'm trying to use their controller support, but I dont understand this error..

com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load shared library 'gdx-controllers-desktop.dll' for target: Windows 10, 32-bit

oahner20:08:51

@idiomancy looks like you're missing a jar

idiomancy20:08:49

hmm...

:dependencies [...
               [com.badlogicgames.gdx/gdx-controllers-desktop "1.9.3"]
               [com.badlogicgames.gdx/gdx-controllers-platform "1.9.3"]
               ...]
dependency management is not my strong suite but.. Im not sure what else need to be provided here

oahner20:08:25

hmm, that actually looks correct

oahner20:08:12

can you show you whole project.clj?

idiomancy20:08:18

yeah absolutely

idiomancy20:08:30

(defproject neofight "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url ""
  :license {:name "Eclipse Public License"
            :url ""}
  :dependencies [[org.clojure/clojure "1.8.0"]
                 [org.clojure/core.async "0.2.385"]
                 ;[org.lwjgl.opengl]
                 [com.badlogicgames.gdx/gdx "1.9.3"]
                 [com.badlogicgames.gdx/gdx-backend-lwjgl "1.9.3"]
                 [com.badlogicgames.gdx/gdx-box2d "1.9.3"]
                 [com.badlogicgames.gdx/gdx-box2d-platform "1.9.3"
                  :classifier "natives-desktop"]
                 [com.badlogicgames.gdx/gdx-bullet "1.9.3"]
                 [com.badlogicgames.gdx/gdx-bullet-platform "1.9.3"
                  :classifier "natives-desktop"]
                 [com.badlogicgames.gdx/gdx-controllers-desktop "1.9.3"]
                 [com.badlogicgames.gdx/gdx-controllers-platform "1.9.3"]
                 [com.badlogicgames.gdx/gdx-platform "1.9.3"
                  :classifier "natives-desktop"]
                 [play-clj "1.1.1"]])

idiomancy20:08:10

fwiw, thats viking programming. I stole the deps specified in play-clj. I actually have no idea what the :classifier flag does in the deps vector

idiomancy20:08:40

the only difference is that I added the controllers stuff for my purposes. Possibly some incompatible deps?

oahner20:08:41

ah, viking programming! never heard that one before

idiomancy20:08:49

hahaha, loot and pillage!

oahner21:08:56

yep, definitely not getting the DLLs in the final jar

idiomancy21:08:33

hmm. is this a problem that points to a solution? 😄

idiomancy21:08:36

lets see.... so the answer has to be one of two things, either I need to add another dep that points to the DLL i need, or I need to add some kind of flag that causes the existing dep to pull down the DLL i need.

idiomancy21:08:19

The former I can work with, some googling. but if its the latter, my project.clj/interop knowledge is insufficient to the task

idiomancy21:08:55

hmm. option 3, might it be the way im attempting to import it..

(com.badlogic.gdx.controllers Controllers)

oahner21:08:20

[com.badlogicgames.gdx/gdx-controllers-platform "1.9.3" :classifier "natives-desktop"]

idiomancy21:08:45

ahh, rather than importing the desktop one directly

idiomancy21:08:53

well, you seem to have gotten it -- new error

idiomancy21:08:53

maybe i shouldnt remove the desktop dep, I should just add the classifier to the platform dep...

idiomancy21:08:14

that did it!

idiomancy21:08:30

@oahner you are awesome. I really appreciate the help.

idiomancy21:08:45

[com.badlogicgames.gdx/gdx-controllers-desktop "1.9.3"]
                 [com.badlogicgames.gdx/gdx-controllers-platform "1.9.3"
                  :classifier "natives-desktop"]

oahner21:08:28

a fresh project created with gdx-setup.jar also depends on com.badlogicgames.gdx/gdx-controllers