Qt libraries 485 for Linux安装过程

上传人:鲁** 文档编号:465766805 上传时间:2023-06-22 格式:DOCX 页数:2 大小:15.13KB
返回 下载 相关 举报
Qt libraries 485 for Linux安装过程_第1页
第1页 / 共2页
Qt libraries 485 for Linux安装过程_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

《Qt libraries 485 for Linux安装过程》由会员分享,可在线阅读,更多相关《Qt libraries 485 for Linux安装过程(2页珍藏版)》请在金锄头文库上搜索。

1、Installing Qt for Linux/X11 PlatformsQt for X11 has some requirements that are given in more detail in theQt for X11 Requirementsdocument.Before you start any actions, do this:sudo apt-get install libX11-dev libXext-dev libXtst-devStep 1: Installing the License File (commercial editions only)If you

2、have the commercial edition of Qt, install your license file as$HOME/.qt-license.For the open source version you do not need a license file.Step 2: Unpacking the ArchiveUnpack the archive if you have not done so already. For example, if you have theqt-everywhere-opensource-src-4.8.5.tar.gzpackage, t

3、ype the following commands at a command line prompt: cd /tmp gunzip qt-everywhere-opensource-src-4.8.5.tar.gz # uncompress the archive tar xvf qt-everywhere-opensource-src-4.8.5.tar # unpack itThis creates the directory/tmp/qt-everywhere-opensource-src-4.8.5containing the files from the archive. We

4、only support the GNU version of the tar archiving utility. Note that on some systems it is called gtar.Step 3: Building the LibraryTo configure the Qt library for your machine type, run the./configurescript in the package directory.By default, Qt is configured for installation in the/usr/local/Troll

5、tech/Qt-4.8.5directory, but this can be changed by using the-prefixoption. cd /tmp/qt-everywhere-opensource-src-4.8.5 ./configureType./configure -helpto get a list of all available options. TheConfiguration Options for Qtpage gives a brief overview of these.To create the library and compile all the

6、demos, examples, tools, and tutorials, type: makeIf-prefixis outside the build directory, you need to install the library, demos, examples, tools, and tutorials in the appropriate place. To do this (as root if necessary), type: make installNote that on some systems the make utility is named differen

7、tly, e.g. gmake. The configure script tells you which make utility to use.Note:If you later need to reconfigure and rebuild Qt from the same location, ensure that all traces of the previous configuration are removed by entering the build directory and typingmake confcleanbefore runningconfigureagain

8、.Step 4: Set the Environment VariablesIn order to use Qt, some environment variables needs to be extended. PATH - to locate qmake, moc and other Qt toolsThis is done like this:In.profile(if your shell is bash, ksh, zsh or sh), add the following lines: PATH=/usr/local/Trolltech/Qt-4.8.5/bin:$PATH exp

9、ort PATHIn.login(in case your shell is csh or tcsh), add the following line: setenv PATH /usr/local/Trolltech/Qt-4.8.5/bin:$PATHIf you use a different shell, please modify your environment variables accordingly.For compilers that do not support rpath you must also extended theLD_LIBRARY_PATHenvironment variable to include/usr/local/Trolltech/Qt-4.8.5/lib. On Linux with GCC this step is not needed.Thats all. Qt is now installed.

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 商业/管理/HR > 营销创新

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号