About using file .so in Qt
-
I have downloaded a .so file which provide a lot of service, How can I use the .so file and call the service functions?
plz show me way to use file .so.Thanks for all supports!
-
You either link against the shared library or you use "QLibrary":http://developer.qt.nokia.com/doc/qt-4.8/qlibrary.html to load the library at runtime.
-
Hi,
As far as I know, you can use it by including it like -lpng -lbb2d -lcsi etc, here as an example I have libpng.so, libbb2d.so, libcsi.so etc..... Its similar to the way Lukas Geyer has mentioned I guess!
Regards :: Krishna Pavan
-
If your library is pure C so it is possible to use it like Lukas explained. But if your contain C++ symbols is not that simple. Take a look at "this post":http://stackoverflow.com/questions/8521929/linking-against-so-library-without-header-files-via-objdump
-
thanks all! I tried read and worked follow QLibrary but I still understand enough about that. And my .so file, which i have, is pure C but file .h attach with it have #include <jni.h> (a .h file in java) i try use it on Qt on Windows (not Linux)? Can be worked? Plz explain me clearly.
Thanks for all supports again!
-
If you right-click on your project name (in project browser) there is option Add Library. Then a window where you choose type of linking and library and then you have library in your project. Check it out.
-
@luva.v.pikor: your way not work the Qt don't recognize file .so
P/s: option Add Library it will be called when u right-click on file .pro of project