How to Install Qt 5 and Qwt on CentOS 6

From Qt Wiki
Revision as of 15:53, 14 January 2015 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Overview

If you are trying to install Qt and Qwt [qwt.sourceforge.net] (Qt Widgets for Technical Applications) on CentOS, then the following instructions should be of good use. These steps were created, after many a trial and error, using Qt 5.1.1 and Qwt 6.1.0 on CentOS 6.4 ×86 64bit. These steps have proven to work on several CentOS machines and could also work on Fedora and Red Hat.

Feel free to use newer versions of the install packages, but just make sure to alter the version numbers in the steps as applicable. Also, most dependencies are covered in these instructions, but there may be others that you will have to find if something fails to build properly.

Installing Qt 5.1.1 on CentOS 6.4

1. Install Development Tools

2. Install glibc-devel.i686 (the 32-bit version is required to build GCC)

3. Download and install GCC [gcc.gnu.org] 4.8.1 or latest version. Instructions copied from here [gcc.gnu.org]

4. Copy new GCC libraries to /usr/lib64

5. Download and install Qt [qt.io] 5.1.1 or latest version

6. Add Qt commands to PATH (e.g. qmake)

  • Create qt5.sh file
  • Add the following lines to qt5.sh
  • Save and close qt5.sh
  • Run qt5.sh
  • Verify that qmake is version 5.1.1

7. Edit Qt Creator desktop configuration file to allow all users to run

  • Comment out or remove the line “Path=/root”
  • Save and close DigiaQtOpenSource-qtcreator.desktop

Installing Qwt 6.1.0 on CentOS 6.4

1. Install mesa-libGLU-devel

2. Download and install Qwt [qwt.sourceforge.net] 6.1.0 or latest version

  • Configure qwtconfig.pri
  • Change QWT_INSTALL_PREFIX to “/opt/qwt-$$QWT_VERSION”
  • Configure rest of qwtconfig.pri and comment/uncomment plugins as desired
  • Save and close qwtconfig.pri
  • Build and install Qwt

3. Link Qwt plugin to Qt

4. Create qwt ld.so configuration file

5. Add the following lines to the .pro file of the Qt project in which you want to use Qwt plugins

6. Done!