February 2, 2012

dleviathan dleviathan
Lab Rat
14 posts

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!

6 replies

February 2, 2012

Lukas Geyer Lukas Geyer
Lab Rat
2074 posts

You either link against the shared library or you use QLibrary [developer.qt.nokia.com] to load the library at runtime.

February 2, 2012

post4pavan post4pavan
Lab Rat
65 posts

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

 Signature 

Qt for Embedded! INTERESTING!

February 2, 2012

OlivierB OlivierB
Lab Rat
23 posts

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 [stackoverflow.com]

February 2, 2012

dleviathan dleviathan
Lab Rat
14 posts

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!

February 2, 2012

l.v.p l.v.p
Lab Rat
31 posts

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.

February 3, 2012

dleviathan dleviathan
Lab Rat
14 posts

@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

 
  ‹‹ Launch url on another device using NFC      Video Play ››

You must log in to post a reply. Not a member yet? Register here!