如何编译一个包含所有 Qt 所需库、QtCreator、Linux 的项目?
首先,我对我的英语感到抱歉。那不是我的语言。
我正在 Linux QtCreator 中开发一个应用程序。当 IDE 询问我将使用的库时,我只是保留选定的库(它们无法取消选中)。现在,我必须在 RedHat 5 中运行编译后的文件,但它没有运行。它告诉“加载共享库时出错:libQtGui.so.4:...”。那么,我该如何解决这个问题呢?
我不应该在 RedHat 中安装 Qt 库(它是一个服务器)。我更喜欢编译 Qt 项目,包括所需的 Qt 库(到自编译文件中,或在同一目录中)。
请问,你能告诉我一些想法吗?
First, I am sorry about my English. That's not my language.
I am developing an application in QtCreator, Linux. When the IDE asked me about the libraries I would use, I just leave the selected ones (they was not enabled for unchecking). Now, I have to run the compiled file in RedHat 5, but it doesn't run. It tells "Error while loading shared libraries: libQtGui.so.4: ...". So, how do I fix this problem?
I should not install Qt libraries in RedHat (it's a server). I prefer to compile the Qt project including needed Qt libraries (into self compiled file, or in the same directory).
Please, can you tell me some idea??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您无法安装 qt,您有两个主要替代方案:
静态链接与动态链接的一些优缺点在 此线程。
If you cannot install qt you have two main alternatives:
Some pros and cons of static vs dynamic linking are discussed in this thread.