Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. About using file .so in Qt
Forum Updated to NodeBB v4.3 + New Features

About using file .so in Qt

Scheduled Pinned Locked Moved Mobile and Embedded
7 Posts 5 Posters 7.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dleviathan
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lgeyer
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      • P Offline
        P Offline
        post4pavan
        wrote on last edited by
        #3

        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

        Qt for Embedded! INTERESTING!

        1 Reply Last reply
        0
        • O Offline
          O Offline
          OlivierB
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • D Offline
            D Offline
            dleviathan
            wrote on last edited by
            #5

            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!

            1 Reply Last reply
            0
            • L Offline
              L Offline
              l.v.p
              wrote on last edited by
              #6

              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.

              1 Reply Last reply
              0
              • D Offline
                D Offline
                dleviathan
                wrote on last edited by
                #7

                @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

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved