如何链接到 Ubuntu 上的 Qwt 库?
我已经在 Ubuntu 10.04 上安装了 Qwt 库。 Qwt 绘图小部件已出现在 QtCreator 中,但当我尝试使用其中任何一个时,我收到错误:
“qwt_plot.h”没有这样的文件或目录。
有人可以帮忙吗?
编辑: 我通过实施 Begemoth 的答案 解决了这个问题,如下所示:
- 打开项目文件 (
.pro
) - 将以下行添加到文件底部:
INCLUDEPATH += /usr/include/qwt-qt4
LIBS += -l qwt-qt4
I have installed the Qwt library on Ubuntu 10.04. The Qwt plotting widgets have appeared in QtCreator but when I try to use any of them I get the error:
"qwt_plot.h" no such file or directory.
Can anyone help?
Edit:
I've solved this by implementing Begemoth's answer as follows:
- Open the project file (
.pro
) - Add the following lines to the bottom of the file:
INCLUDEPATH += /usr/include/qwt-qt4
LIBS += -l qwt-qt4
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Ubutu 和 Debian 一样提供了多个版本的 qwt(适用于 qt4 和 qt3),因此 qwt 的包含文件位于
/usr/include/qwt-qt3
或/usr/include/qwt-qt4< /code> 目录,您需要将此目录添加到包含搜索路径的列表中,例如使用
-I
gcc 标志。PS:我假设您已经安装了qwt的开发包(libqwt5-qt4-dev)。
Ubutu like Debian provides several versions of qwt (for qt4 and qt3), so include files for qwt reside in
/usr/include/qwt-qt3
or/usr/include/qwt-qt4
directory, you need to add this directory to the list of the include search path, e.g. with-I
gcc flag.PS: I assume that you have installed the development package for qwt (libqwt5-qt4-dev).