On Ubuntu Linux the command line tool to install packages is apt-get. While the dependencies are typically all available as standard packages for your Linux distribution, it can take some time to identify and install all of the packages that are needed, especially on a clean system where you have never built Qt before. This will occur when Qt is configured.įiguring out all of the correct dependencies to build Qt is often the hardest part of the build process. Others are optional and Qt will make use of them if present and disable certain features if absent. Qt is dependent on a number of tools and libraries. Install the required development packages and other build dependencies for Qt % cd qt-everywhere-opensource-src-5.7.1 Step 3. The files will be extracted into a directory which you can now cd to: % tar xzf qt-everywhere-opensource-src-5.7.1.tar.gz If you downloaded the tar.gz file above, then this command will work: The next step is to extract the files from the source archive. Extract the source code into a working directory The file md5sums.txt in the same directory on the download server lists the correct checksums for each file so you can verify it against what you downloaded. If you want to verify that the download was not corrupted, you can generate an MD5 checksum of the file after you download it: The Qt download site will attempt to use a download mirror server that is geographically close to you, so download speed should be quite good, usually limited only by the speed of your Internet connection. If you want to download the file directly from the Linux command line, you can use: Some of the other formats (like 7z) are smaller because they use an archive format with better compression, but use less-commonly available archiving tools that you may not have installed on your system. We'll select qt-everywhere-opensource-src-5.7.1.tar.gz, which is suitable for Linux systems. You will see several files there that offer the release in different archive formats. In our case we want to select to access the official source code release for Qt 5.7.1 as a single archive file. I find the easiest way to download Qt version is to browse to the download server and navigate to the appropriate directory. Other versions of Qt will follow a similar process. We will build Qt version 5.7.1 which is the "recommended" Qt version at the time of writing. If you are using another Linux distribution, the build process will be similar but some of the specific commands will be different. Ubuntu is one of the most popular desktop Linux distributions and this is the most recent LTS (long term support) release. Ubuntu Exampleįor this example will use 64-bit Ubuntu desktop Linux version 16.04.1 LTS. Let's walk through the process for doing this on a Linux desktop system showing in detail the commands used to perform all the steps. We will be building Qt natively to run on the desktop rather than as a cross-compiled version for developing code for an embedded target system. ICS recommends Qt Commercial for support, maximum IP protection, and because we all should support the community. (The Qt Company offers a free 30-trial version of Qt Commercial.)
0 Comments
Leave a Reply. |