At first, this error looked normal to me, but after trying all known things, I still have no luck running my program. So please let me explain in detail.
I am trying to run TC(TokyoCabinet) example using TC's java api on Ubuntu. Both TC and Tc-java got built properly and installed in my home directory. (Not /usr/local/lib).
I am running the program like -
$ java -Djava.library.path=/home/siddharth/tools/tc-java/lib -classpath ./bin/:lib/tokyocabinet.jar HdbTest
And getting following error -
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/siddharth/tools/tc-java/lib/libjtokyocabinet.so.1.1.0: /home/siddharth/tools/tc-java/lib/libjtokyocabinet.so.1.1.0: undefined symbol: tcversion
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:993)
at tokyocabinet.Loader.load(Loader.java:41)
at tokyocabinet.HDB.<clinit>(HDB.java:37)
at HdbTest.main(HdbTest.java:10)
Now, this error is about symbol "tcversion". So I ran -
$ nm /home/siddharth/tools/tc-java/lib/libjtokyocabinet.so.1.1.0 | grep -i tcversion
U tcversion
which means tcversion is not there.
Actually tcversion is inside main TC library
$ nm /home/siddharth/tools/tc/lib/libtokyocabinet.so | grep -i tcversion
0008096c D tcversion
Now, the question is, how can I make these libraries connect?