如何链接到 Ubuntu 上的 Qwt 库?

发布于 2024-11-03 20:44:43 字数 443 浏览 7 评论 0原文

我已经在 Ubuntu 10.04 上安装了 Qwt 库。 Qwt 绘图小部件已出现在 QtCreator 中,但当我尝试使用其中任何一个时,我收到错误:

“qwt_plot.h”没有这样的文件或目录。

有人可以帮忙吗?

编辑: 我通过实施 Begemoth 的答案 解决了这个问题,如下所示:

  1. 打开项目文件 (.pro )
  2. 将以下行添加到文件底部:
    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:

  1. Open the project file (.pro)
  2. Add the following lines to the bottom of the file:
    INCLUDEPATH += /usr/include/qwt-qt4
    LIBS += -l qwt-qt4

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文