如何安装两个版本的Qt并告诉应用程序使用哪个版本? [英] How to install two versions of Qt and tell the application which to use?

查看:1044
本文介绍了如何安装两个版本的Qt并告诉应用程序使用哪个版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Qt开发一个应用程序,但是使用D语言(具有QtD绑定).我注意到我的应用程序因Qt 4.7.x崩溃,因此我需要改用Qt 4.6.2.但是,在我的系统中安装了Qt 4.7.2.不幸的是,我既没有使QtD与最新的Qt版本一起工作,也没有(恐怕)指望QtD开发人员...

I am developing an application in Qt, but using D language (with QtD binding). I've noticed that my app crashes with Qt 4.7.x, so I need to use Qt 4.6.2 instead. However in my system Qt 4.7.2 is installed. Unfortunately I neither make QtD work with the latest Qt versions nor (I'm afraid) count on QtD developers...

我唯一需要做的就是将我的应用程序安装在系统Qt 4.6.2库中并使用它,但让所有其他应用程序仍然使用Qt 4.7.2.是否有可能?如果是,该怎么办?

The only thing I need to make my application install in system Qt 4.6.2 libs and use it, but let all the other applications still use Qt 4.7.2. Is it possible? If it is, how to do it then?

推荐答案

您的问题的答案是Qt的版本由您用来生成Makefile的qmake决定.

The answer to your question is the version of Qt is determined by the qmake you use to generate your Makefile.

/opt/QtSDK/Qt-4.6.2/bin/qmake

/opt/QtSDK/Qt-4.6.2/bin/qmake

/opt/QtSDK/Qt-4.7.3/bin/qmake

/opt/QtSDK/Qt-4.7.3/bin/qmake

每个人都将使用目录中的库.

Each will use the library in the directory.

这篇关于如何安装两个版本的Qt并告诉应用程序使用哪个版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆