OK, now I could build the library, but when I try to use it I get:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/username/workspace/libUsbJava/libusbjava/trunk/LibusbJava/out/libusbJava-1.0.so.0.0.0: /home/username/workspace/libUsbJava/libusbjava/trunk/LibusbJava/out/libusbJava-1.0.so.0.0.0: undefined symbol: _Z18Usb_Device_connectP7JNIEnv_
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
This appears when calling:
Usb_Bus busses = LibusbJava.usb_get_busses();
I'm on Ubuntu 12.04 (x64) and have installed the following packages:
Sorry, after your posting I realized that I messed up with the repo I am comitting to. It seems as if the upgrade of the project on sf created a new SVN repository copying the contents of the old one but did not remove the old repository.
I now merged the commits from the old repo to the new one. Please checkout again, rebuild the library and retry.
Thanks for your patience.
sorry for my late reply...
Meanwhile I realized that there are two different svn repositories. One which is mentioned on the website:
and the one in sourceforge:
That's why I wasnt able to get the latest verison of build.xml the last time... :-)
Now I used the sourceforge repo and after checking out I get the following message when I try to build:
username@pc:~/workspace/libUsbJava2/trunk/LibusbJava$ ant linux
[echo] Building Library
[exec] /home/username/workspace/libUsbJava2/trunk/LibusbJava/objects/Usb_Device.cpp: In function »void Usb_Device_disconnect(JNIEnv*)«:
[exec] /home/username/workspace/libUsbJava2/trunk/LibusbJava/objects/Usb_Device.cpp:88:35: Error: »memset« is not defined in this scope.
/home/username/workspace/libUsbJava2/trunk/LibusbJava/build.xml:110: exec returned: 1
Total time: 1 second
(I translated the messages into English. So they might be slightly different)
I also removed the dependency for "LibusbJava Test Linux" in the linux target of build.xml as we said the last time.
Yes. Had an idea: The function mentioned ("memset") is not declared to the compiler as #include <string.h> was missing. Don't know why the compile run worked for me. I expected that the compiler at most issues a warning.
But anyway. Placed the include directive in the Usb_Device.cpp file. Please retry to build
Thanks uniederer! The build works now also on my machine. I have another problem, for which I will open a separate topic.
Log in to post a comment.