how can I deploy my own static library?
-
Hello,
My environment is below,
Mac mini, MacOS M1 64bit, Sonoma 14.5
XCode: 15.2I 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. -
@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.
-
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. -
@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. -
@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.
-
This is a good idea.
I will try it.
Thanks.
Have a nice day. -