Deploy Qt and Qwt on Linux, and deploy QtQwt in Linux

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.