How to use .so file in c++ program?

i have a .so file in desktop directory. i want to use it in my c++ program.I do not want to use .so file in compilers linker library.I want to use it in my main program.How can i do this?Any one please help me
brother, can you please give me with some code syntax?
i wrote it in my code but did not work for me.

dlopen("/home/anamul/Downloads/mysql-connector-c++-1.1.9-linux-ubuntu16.04-x86-64bit/lib/libmysqlcppconn.so",RTLD_LAZY);

am i wrong?
What does dlerror() report?
Perhaps you can run ldd on the library to check what its dependencies are:
 
ldd /home/anamul/Downloads/mysql-connector-c++-1.1.9-linux-ubuntu16.04-x86-64bit/lib/libmysqlcppconn.so


ldd will show all the dependencies and where they've been found.
Topic archived. No new replies allowed.