2010-01-01

libusbJava.so

For some reason, libusbJava did not want to compile on my linux system. It consistently issued warnings that some "libusbpp.so" (which I still have yet to figure out what the heck it is) was missing. I did some googling, and eventually managed to compile it by hand using this command:

g++ -shared -Wl,-soname,libusbJava.so -I/usr/lib -I/usr/lib/jvm/java-6-sun-1.6.0.16/include -I/usr/lib/jvm/java-6-sun-1.6.0.16/include/linux -shared LibusbJava.cpp -olibusbJava.so.0.2.4 /usr/lib/libusb.a

Note that the /usr/lib/jvm/java-6-sun-1.6.0.16 paths are specific to whatever version of java you're using.

Anyway, with that taking upwards of an hour to do, I figured I'd post a pre-built binary for anyone that's looking for one. This was built on Ubuntu 9.04 against libusb-0.1-4 (Synaptic reports its version number to be 2:0.1.12-13; I'm not knowledgable enough to know the difference between the two), so I won't make any guarantees as to whether it will work properly on your system. You can download the binary here.

2 comments:

animal said...

libusbpp => libusb C++

took me 30 mins to figure that out! so anyway for others wondering wtf is libusbpp.so just install

libusb++-dev

Guenter said...

Thanks for posting the binary. Saved me probably days which I don't have for my quick proof of concept (Jython with Swing on Linux -> USB -> AT90USB1287).