您的位置:首页 > 编程语言 > Qt开发

qt编译及qwt开发环境搭建笔记

2014-08-13 20:48 483 查看
qt的编译安装参见http://qt-project.org/doc/qt-4.8/install-x11.html

应注意以下要点,需要安装以下套件吗,否则编译后跟ubuntu的界面不兼容

Error while building on Ubuntu 12.*

Before building it on Ubuntu 12.* be sure you have these packages:

libfontconfig1-dev libfreetype6-dev libx11-dev libxcursor-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxrandr-dev libxrender-dev

If you don’t have them (it usually happens if you are on the clear or semi-clear ubuntu) in your system and you try to build Qt you will get this error:

Basic XLib functionality test failed! You might need to modify the include and library search paths by editing QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in <path>.

To avoid it check & install them with this command:

sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libxcursor-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxrandr-dev libxrender-dev

其他基本没什么要注意的

-----------------------------------------------------------------------------------------------------------------------------------------------------------

qwt安装也是参见安装手册

以下注意一下,使用QWT时需要添加其配置,添加方法如下

When using qmake it can included from the application project file in 2 different ways:

Adding Qwt as qmake feature

When using the qmake feature mechanism you can bind a special version of qmake to a special installation of Qwt without having to add this dependency to the application project. How to add Qwt as feature is documented in the qmake docs.

After adding Qwt as a feature f.e on Linux as a persistent property ....
qmake -set QMAKEFEATURES ${QWT_ROOT}/features

.. the following line can be added to the application project file:
CONFIG += qwt

关于qmake对上述feature的解释详见https://qt-project.org/doc/qt-5/qmake-advanced-usage.html#adding-new-configuration-features
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: