Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Loading a library from a subfolder of the applicaiton dir

Loading a library from a subfolder of the applicaiton dir

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
4 Posts 3 Posters 534 Views 2 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.
  • gde23G Offline
    gde23G Offline
    gde23
    wrote on last edited by
    #1

    Hello,

    i have following setup:
    Application is installed to lets say C://myApp/
    Now I want to be one library inside C://myApp/mySpecialLib/
    The other Qt libs may stay in the first folder.

    So what do I need to do so windows will find the lib.

    • I do not want to add the folder to PATH since this will mess up the system path environment.
    • The Library contains a class that i want to use. Now as far as I understood I cannot use QLibrary for delayed loading since it only works for functions, not classes.
    • QCoreApplication::addLibraryPath() is not working since, as far as i understood does not help windows finding libraries and is only for Qt plugins and such stuff.

    So how can I handle this the best way?

    Pablo J. RoginaP 1 Reply Last reply
    0
    • gde23G gde23

      Hello,

      i have following setup:
      Application is installed to lets say C://myApp/
      Now I want to be one library inside C://myApp/mySpecialLib/
      The other Qt libs may stay in the first folder.

      So what do I need to do so windows will find the lib.

      • I do not want to add the folder to PATH since this will mess up the system path environment.
      • The Library contains a class that i want to use. Now as far as I understood I cannot use QLibrary for delayed loading since it only works for functions, not classes.
      • QCoreApplication::addLibraryPath() is not working since, as far as i understood does not help windows finding libraries and is only for Qt plugins and such stuff.

      So how can I handle this the best way?

      Pablo J. RoginaP Offline
      Pablo J. RoginaP Offline
      Pablo J. Rogina
      wrote on last edited by
      #2

      @gde23 you may also want to take a look at QLibrary

      Upvote the answer(s) that helped you solve the issue
      Use "Topic Tools" button to mark your post as Solved
      Add screenshots via postimage.org
      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

      gde23G JonBJ 2 Replies Last reply
      0
      • Pablo J. RoginaP Pablo J. Rogina

        @gde23 you may also want to take a look at QLibrary

        gde23G Offline
        gde23G Offline
        gde23
        wrote on last edited by
        #3

        @Pablo-J-Rogina As far as I understood QLibrary is only for loading libs with functions in them but cannot be used to load a lib containing a class?

        1 Reply Last reply
        0
        • Pablo J. RoginaP Pablo J. Rogina

          @gde23 you may also want to take a look at QLibrary

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @Pablo-J-Rogina
          I do not know how to advise @gde23 on this. You might take a look at e.g. https://stackoverflow.com/questions/26234327/qlibrary-import-a-class, which is covering what he is talking about the problem of accessing classes in a dynamically-loaded DLL. I can see the problem...!

          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