在 linux 中分发 QT 应用程序
Distribute QT app in linux
我想在 linux 而不是源代码中分发 QT 应用程序。
我希望我的应用程序在 linux 未安装 QT 的情况下工作。
我发现 Google 等等...
他们说
1. ldd ./application and check the .so file
2. copy .so file to another dir
3. move application file to same dir
4. then distribute(?)
我尝试了很多解决方案(静态编译,动态编译)
, 但它不起作用.....
如何分发我的应用程序....?
(我在 Ubuntu 14.04 中使用 QT Creator)
look at the linux-deployment-docs of qt
您必须在您的系统上静态构建 Qt。之后,您就可以静态 link Qt 库。如果 ldd 输出不打印与 Qt 相关的库,则它是成功的,应用程序将 运行 在另一个没有安装 Qt 的发行版上。 glibc 和其他一些共享对象
保持共享。
因此,如果您在不同系统的 ldd 输出中未找到消息(即 libicui18n.so.51),则必须安装所需的元素。
提示:
我有时通过将 .so 文件从我的系统复制到不同的系统并调用 ldconfig 来解决这些问题。
我想在 linux 而不是源代码中分发 QT 应用程序。
我希望我的应用程序在 linux 未安装 QT 的情况下工作。
我发现 Google 等等... 他们说
1. ldd ./application and check the .so file
2. copy .so file to another dir
3. move application file to same dir
4. then distribute(?)
我尝试了很多解决方案(静态编译,动态编译) , 但它不起作用.....
如何分发我的应用程序....? (我在 Ubuntu 14.04 中使用 QT Creator)
look at the linux-deployment-docs of qt
您必须在您的系统上静态构建 Qt。之后,您就可以静态 link Qt 库。如果 ldd 输出不打印与 Qt 相关的库,则它是成功的,应用程序将 运行 在另一个没有安装 Qt 的发行版上。 glibc 和其他一些共享对象 保持共享。
因此,如果您在不同系统的 ldd 输出中未找到消息(即 libicui18n.so.51),则必须安装所需的元素。
提示: 我有时通过将 .so 文件从我的系统复制到不同的系统并调用 ldconfig 来解决这些问题。