Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. how can I deploy my own static library?
Forum Update on Monday, May 27th 2025

how can I deploy my own static library?

Scheduled Pinned Locked Moved Solved Qt 6
7 Posts 4 Posters 513 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.
  • W Offline
    W Offline
    Wunian
    wrote on 5 Jun 2024, 05:45 last edited by
    #1

    Hello,
    My environment is below,
    Mac mini, MacOS M1 64bit, Sonoma 14.5
    XCode: 15.2

    I use Qt 6.5.3, and create my own static library, its name is libMac.a,
    and works fine with my test application.

    My question is, how can I deploy my static library (libMac.a),
    so I can offer my static library to someone who wants to use it?

    Thanks.
    Have a nice day.

    1 Reply Last reply
    0
    • W Wunian
      6 Jun 2024, 02:17

      @arceajin

      Sorry for my question is not clear.

      My static library Qt created is only for internal use.
      In my static library, I use QCamera and QVideoSink for video streaming capturing.
      Now my partners, they don't have Qt environment, and want to use my static library.

      Their problem is, they cannot only use my static library without Qt resource in their PC/NB,
      so that's why I ask this question in the forum.

      Do you know how to deploy or collect Qt resource (or Qt framework, ..., etc.) which my static library needed?

      Thanks.
      Have a nice day.

      S Offline
      S Offline
      SimonSchroeder
      wrote on 6 Jun 2024, 06:38 last edited by
      #5

      @Wunian said in how can I deploy my own static library?:

      Do you know how to deploy or collect Qt resource (or Qt framework, ..., etc.) which my static library needed?

      Usually, there is macdeployqt to gather all dependencies. However, I am not sure if this works with static libraries as well. Otherwise you could just create an empty application that links to your static library and use macdeployqt on that. Than you'll have everything in one place to distribute with your lib.

      W 1 Reply Last reply 7 Jun 2024, 08:48
      1
      • A Offline
        A Offline
        arceajin
        wrote on 5 Jun 2024, 06:12 last edited by
        #2

        Cannot see how this question is related to Qt.
        If you create something using Qt and want to share it with somebody what about open source and share it somewhere like GitHub?

        W 1 Reply Last reply 6 Jun 2024, 02:17
        1
        • A arceajin
          5 Jun 2024, 06:12

          Cannot see how this question is related to Qt.
          If you create something using Qt and want to share it with somebody what about open source and share it somewhere like GitHub?

          W Offline
          W Offline
          Wunian
          wrote on 6 Jun 2024, 02:17 last edited by
          #3

          @arceajin

          Sorry for my question is not clear.

          My static library Qt created is only for internal use.
          In my static library, I use QCamera and QVideoSink for video streaming capturing.
          Now my partners, they don't have Qt environment, and want to use my static library.

          Their problem is, they cannot only use my static library without Qt resource in their PC/NB,
          so that's why I ask this question in the forum.

          Do you know how to deploy or collect Qt resource (or Qt framework, ..., etc.) which my static library needed?

          Thanks.
          Have a nice day.

          J S 2 Replies Last reply 6 Jun 2024, 05:22
          0
          • W Wunian
            6 Jun 2024, 02:17

            @arceajin

            Sorry for my question is not clear.

            My static library Qt created is only for internal use.
            In my static library, I use QCamera and QVideoSink for video streaming capturing.
            Now my partners, they don't have Qt environment, and want to use my static library.

            Their problem is, they cannot only use my static library without Qt resource in their PC/NB,
            so that's why I ask this question in the forum.

            Do you know how to deploy or collect Qt resource (or Qt framework, ..., etc.) which my static library needed?

            Thanks.
            Have a nice day.

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 6 Jun 2024, 05:22 last edited by
            #4

            @Wunian said in how can I deploy my own static library?:

            Now my partners, they don't have Qt environment, and want to use my static library.

            If I understand your description correctly, you want to provide your library together with all resources (including Qt libs) it depends on. You don't really need a static Qt build for that, simply deploy all dependencies together with your lib (means: deploy also Qt libraries which are needed to use your lib).
            If you don't want this then you will have to build Qt statically by yourself, which is not a trivial job.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            W 1 Reply Last reply 7 Jun 2024, 08:46
            0
            • W Wunian
              6 Jun 2024, 02:17

              @arceajin

              Sorry for my question is not clear.

              My static library Qt created is only for internal use.
              In my static library, I use QCamera and QVideoSink for video streaming capturing.
              Now my partners, they don't have Qt environment, and want to use my static library.

              Their problem is, they cannot only use my static library without Qt resource in their PC/NB,
              so that's why I ask this question in the forum.

              Do you know how to deploy or collect Qt resource (or Qt framework, ..., etc.) which my static library needed?

              Thanks.
              Have a nice day.

              S Offline
              S Offline
              SimonSchroeder
              wrote on 6 Jun 2024, 06:38 last edited by
              #5

              @Wunian said in how can I deploy my own static library?:

              Do you know how to deploy or collect Qt resource (or Qt framework, ..., etc.) which my static library needed?

              Usually, there is macdeployqt to gather all dependencies. However, I am not sure if this works with static libraries as well. Otherwise you could just create an empty application that links to your static library and use macdeployqt on that. Than you'll have everything in one place to distribute with your lib.

              W 1 Reply Last reply 7 Jun 2024, 08:48
              1
              • J jsulm
                6 Jun 2024, 05:22

                @Wunian said in how can I deploy my own static library?:

                Now my partners, they don't have Qt environment, and want to use my static library.

                If I understand your description correctly, you want to provide your library together with all resources (including Qt libs) it depends on. You don't really need a static Qt build for that, simply deploy all dependencies together with your lib (means: deploy also Qt libraries which are needed to use your lib).
                If you don't want this then you will have to build Qt statically by yourself, which is not a trivial job.

                W Offline
                W Offline
                Wunian
                wrote on 7 Jun 2024, 08:46 last edited by
                #6

                @jsulm

                Thanks for your information.
                Have a nice day.

                1 Reply Last reply
                0
                • S SimonSchroeder
                  6 Jun 2024, 06:38

                  @Wunian said in how can I deploy my own static library?:

                  Do you know how to deploy or collect Qt resource (or Qt framework, ..., etc.) which my static library needed?

                  Usually, there is macdeployqt to gather all dependencies. However, I am not sure if this works with static libraries as well. Otherwise you could just create an empty application that links to your static library and use macdeployqt on that. Than you'll have everything in one place to distribute with your lib.

                  W Offline
                  W Offline
                  Wunian
                  wrote on 7 Jun 2024, 08:48 last edited by
                  #7

                  @SimonSchroeder

                  This is a good idea.
                  I will try it.
                  Thanks.
                  Have a nice day.

                  1 Reply Last reply
                  0
                  • W Wunian has marked this topic as solved on 7 Jun 2024, 08:49

                  1/7

                  5 Jun 2024, 05:45

                  • Login

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