dynamic linking error of libraries in cassandra

265 Views Asked by At

I am able to link the dynamic library but getting errors while executing. Can anyone please explain why? I am new to dynamic libraries and Cassandra.

Moreover, can anyone please point out some pros and cons of using a C driver in Cassandra?

Pasting the output here:

stark@stark-MS-7788:~/cpp-driver/examples/basic$ ll total 24040 drwxrwxr-x  stark stark    4096 Oct 23 12:27 ./ drwxrwxr-x 23 stark stark    4096 Oct 23 09:58 ../
-rwxrwxr-x  1 stark stark   18968 Oct 23 11:46 a.out*
-rw-rw-r--  1 stark stark    6283 Oct 23 11:31 basic.c
-rw-rw-r--  1 stark stark    8672 Oct 23 12:17 basic.o
-rw-rw-r--  1 stark stark  281187 Oct 23 11:31 cassandra.h
-rw-rw-r--  1 stark stark     537 Oct 23 09:58 CMakeLists.txt
-rwxrwxr-x  1 stark stark   18968 Oct 23 12:27 demo*
-rw-rw-r--  1 stark stark       6 Oct 23 09:58 .gitignore
-rwxrwxr-x  1 stark stark 8084160 Oct 23 12:27 libcassandra.so*
-rwxrwxr-x  1 stark stark 8084160 Oct 23 12:27 libcassandra.so.2*
-rwxrwxr-x  1 stark stark 8084160 Oct 23 12:27 libcassandra.so.2.7.1* 
stark@stark-MS-7788:~/cpp-driver/examples/basic$ gcc -o demo basic.o libcassandra.so.2.7.1
stark@stark-MS-7788:~/cpp-driver/examples/basic$ ./demo ./demo: error while loading shared libraries: libcassandra.so.2: cannot open shared object file: No such file or directory

The output image for the both cases is here.

0

There are 0 best solutions below