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. Looking for dlls to be linked dynamically under a specific folder?
Forum Updated to NodeBB v4.3 + New Features

Looking for dlls to be linked dynamically under a specific folder?

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 1.3k 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
    dolevo
    wrote on 21 Jun 2013, 11:27 last edited by
    #1

    Hi all,

    I have an application which requires 3 dlls. For a certain reason, I need to put the dlls under a specific folder. Could you please tell me if there is an easy code to add .pro file or any other part so that the executable will look for the dlls to link dynamically under the specific folder?

    Thanks.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 21 Jun 2013, 11:40 last edited by
      #2

      @
      LIBS += -L/path/to/your/libs -llib1name -lib2name -lib3name
      @

      (Z(:^

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dolevo
        wrote on 21 Jun 2013, 11:47 last edited by
        #3

        [quote author="sierdzio" date="1371814853"]@
        LIBS += -L/path/to/your/libs -llib1name -lib2name -lib3name
        @[/quote]

        But this is not for runtime right? I have this line in my pro file but it is pointing to the folder where I put the dlls for build.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sierdzio
          Moderators
          wrote on 21 Jun 2013, 11:50 last edited by
          #4

          No, of course, it is for linking, just as you have asked.

          How the OS provides shared libraries is outside of Qt's scope. On Windows, the DLL needs to either be installed in system32, or reside in current directory.

          Unix OSes are much more flexible in that respect.

          (Z(:^

          1 Reply Last reply
          0
          • D Offline
            D Offline
            dolevo
            wrote on 21 Jun 2013, 12:32 last edited by
            #5

            So there is no way to say the application that on runtime if you want to link a dll, go and find it under ... folder.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              sierdzio
              Moderators
              wrote on 21 Jun 2013, 13:03 last edited by
              #6

              Nope.

              Read through "this":http://stackoverflow.com/questions/107888/is-there-a-windows-msvc-equivalent-to-the-rpath-linker-flag, though, if you are interested in workarounds.

              (Z(:^

              1 Reply Last reply
              0

              3/6

              21 Jun 2013, 11:47

              • Login

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