Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Libqgif.so in a different folder [SOLVED]
Forum Updated to NodeBB v4.3 + New Features

Libqgif.so in a different folder [SOLVED]

Scheduled Pinned Locked Moved General and Desktop
8 Posts 3 Posters 2.7k 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.
  • G Offline
    G Offline
    godbod
    wrote on last edited by
    #1

    Hello everyone,

    How can I use a different directory for the plugin : libqgif.so ?

    When executing, my binary works only if they's a directory named : imageformats/ containing libqgif.so
    I want to put this library in a different directory so that I can have a cleaner architecture like

    • src
    • include
    • bin ----> myBin
    • lib ---->libqgif.so

    Thanks in advance.

    L'imagination est tout, c'est l’aperçu des futures attractions de la vie.

    1 Reply Last reply
    0
    • JohanSoloJ Offline
      JohanSoloJ Offline
      JohanSolo
      wrote on last edited by
      #2

      This depends on your OS.

      On linux you can use LD_LIBRARY_PATH, or add -Wl,-rpath=path to the linker option for instance, I think this should work on Mac OS too. I am not aware of a similar way to do it on Windows...

      `They did not know it was impossible, so they did it.'
      -- Mark Twain

      1 Reply Last reply
      0
      • G Offline
        G Offline
        godbod
        wrote on last edited by
        #3

        Thanks for your answer.
        I am using Linux.
        Are you sure?
        This will not work as the QtCore hard coded the path to the <QtInstall>/plugin/imageformats for the search.

        L'imagination est tout, c'est l’aperçu des futures attractions de la vie.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          You can use "qt.conf":http://qt-project.org/doc/qt-5/qt-conf.html for that but the imageformats folder is still needed. Qt searches for specific plugin types in specific folders, see "here":http://qt-project.org/doc/qt-5.0/qtcore/plugins-howto.html.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • G Offline
            G Offline
            godbod
            wrote on last edited by
            #5

            Hi SGaist, suppose I want to find my plugin libqgif.so in the path : /export/home/lib
            what can I add in the qt.conf

            regards

            L'imagination est tout, c'est l’aperçu des futures attractions de la vie.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Do you mean /export/home/lib/imageformats ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • G Offline
                G Offline
                godbod
                wrote on last edited by
                #7

                Okay. I got you. I will test it. And come back.

                thanks in advance.

                L'imagination est tout, c'est l’aperçu des futures attractions de la vie.

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  godbod
                  wrote on last edited by
                  #8

                  Great! It is working indeed. The name imageformats is compulsory indeed.

                  L'imagination est tout, c'est l’aperçu des futures attractions de la vie.

                  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