PDA

View Full Version : How to load external ".so " library file ??



Radhika
10th November 2015, 05:05
Hey, I want to add ".so " shared library file in my application .
how do I do it??

prasad_N
10th November 2015, 07:58
If you are using Qt creator, you need to modify .pro file as below.


INCLUDE += your include path
//Ex: INCLUDEPATH += /boost/1.46.1.p1_64/include
LIBS += path where your .so presents & .so file
//Ex: LIBS += -L/boost/1.46.1.p1_64/lib -lboost_regex

above is to use boost library in my application
where /boost/1.46.1.p1_64/include is where my .h files of library presents &

-L/boost/1.46.1.p1_64/lib -lboost_regex // here -L should be preceded by lib path (/boost/1.46.1.p1_64/lib is where boost_regex.so presents) & boost_regex should be preceded by -l


& if you search in google, you will get lots of pages with detailed explanation .

Radhika
10th November 2015, 10:58
It is giving .so file is crashed , could not read file
but .so is working properly

prasad_N
11th November 2015, 06:08
It is giving .so file is crashed , could not read file
but .so is working properly

How did you make sure that .so is working fine, try to regenerate .so file and check if you have read permissions to .so