Deploy Qt and Qwt on Linux, and deploy QtQwt in Linux
Install Qt
Install the g/g ++ and OpenGL packages according to the instructions on the www. Qt. io official website before deploying qt. When the OpenGL package is not installed, errors such as GL. h cannot be found when you use Qt to compile the program. Installation command:
Sudo yum install "C Development Tools and Libraries" sudo yum install mesa-libGL-devel
After g/g ++ is installed, download the qt installation package on the www. Qt. io website, which is a run package. Grant the package execution permission before executing the package:
Sudo chmod + x qt-opensource-x64.xxxx.runsudo./qt-opensource-x64.xxx.run
The Qt installation location is generally in the/opt directory. At this time, you need ~. Add the environment variable to/bashrc:
Export QTDIR =/opt/Qt5.8.0/5.8/gcc_64export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH: $ QTDIR/libexport PATH = $ PATH: $ QTDIR/bin
After installing Qt, compile a demo program and install Qwt.
Install Qwt
After downloading and decompressing Qwt, go to the decompressed directory during the interruption and execute the following commands in sequence:
Qmakemakemake install
So far, Qwt installation is complete, and then in ~. The environment variable for Qwt configuration in/bashrc is:
Export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/usr/local/qwt-6.1.3/lib
The default installation directory of Qwt is/usr/local. Copy the QtDesigner plug-in generated in this directory to the plugins directory corresponding to the Qt installation directory. Note that the bin directory and QtCreator directory of Qt have the plug-ins directory of Designer, and both must be copied. Create a new Qt + Qwt project and add the following library file description to the pro file to compile the project successfully:
INCLUDEPATH + =/usr/local/qwt-6.1.3/includeLIBS + =-L "/usr/local/qwt-6.1.3/lib/"-lqwt
So far, the Qt + Qwt environment has been successfully deployed on Linux!
Description ,~. /Bashrc is the bash configuration file. It is a hidden file in the main directory of the Files folder.