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. Shared Library: Copying after build (Install)
QtWS25 Last Chance

Shared Library: Copying after build (Install)

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 4 Posters 1.7k Views
  • 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.
  • F Offline
    F Offline
    fem_dev
    wrote on last edited by fem_dev
    #1

    I have a shared library Qt project and I would like to copy the output *.dll or *.so file to another custom destination after build.
    I'm using Windows now, but this solution must be cross-platform (Windows, Linux and Mac).

    I tried something like:

    shared_lib.path = "C:/Users/lamar/Desktop/shared_lib_folder" # valid only in Windows enviroment
    shared_lib.files += $$OUT_PWD/debug/my_shared_lib.dll # or *.so or *.dylib
    INSTALLS += shared_lib
    

    Thanks,

    F 1 Reply Last reply
    1
    • F fem_dev

      I have a shared library Qt project and I would like to copy the output *.dll or *.so file to another custom destination after build.
      I'm using Windows now, but this solution must be cross-platform (Windows, Linux and Mac).

      I tried something like:

      shared_lib.path = "C:/Users/lamar/Desktop/shared_lib_folder" # valid only in Windows enviroment
      shared_lib.files += $$OUT_PWD/debug/my_shared_lib.dll # or *.so or *.dylib
      INSTALLS += shared_lib
      

      Thanks,

      F Offline
      F Offline
      fem_dev
      wrote on last edited by
      #2

      @fem_dev I solve that creating a Windows *.bat file that copies my shared libraries to another folder...

      aha_1980A 1 Reply Last reply
      0
      • F fem_dev

        @fem_dev I solve that creating a Windows *.bat file that copies my shared libraries to another folder...

        aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi @fem_dev,

        note that you can use scopes to create cross-platform install steps.

        Regards

        Qt has to stay free or it will die.

        1 Reply Last reply
        3
        • C Offline
          C Offline
          Chrisw01
          wrote on last edited by
          #4

          I know you already solved this but I ran across a library today that utilized QMAKE_POST_LINK that may work better for you.

          Here is one site from google.

          QMake - how to copy a file to the output

          Maybe more what you're looking for...

          Take Care

          1 Reply Last reply
          2
          • JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by
            #5

            Another way is to add make install as a custom build step in Qt Creator: https://doc.qt.io/qtcreator/creator-build-settings.html

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            1 Reply Last reply
            3

            • Login

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