Mac OS X下安装和使用QWT [英] Install and use QWT under Mac OS X

查看:29
本文介绍了Mac OS X下安装和使用QWT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试让 QWT 6.1.0 在 MAC OS X 10.7.5 下运行.我按照这里的说明进行操作 --> http://qwt.sourceforge.net/qwtinstall.html我没有更改配置文件中的某些内容.

I am currently trying to get QWT 6.1.0 running under MAC OS X 10.7.5. I followed the instructions over here --> http://qwt.sourceforge.net/qwtinstall.html I didn't changed something inside the configuration files.

所以一切正常,但现在我想在我自己的项目中使用 qwt-libary.我将以下行添加到我的 .pro

So everything worked fine, but now I want to use the qwt-libary inside my own Project. I added the following line to my .pro

INCLUDEPATH +=  /Users/userX/Downloads/qwt-6.1.0/src

所以我的项目现在能够找到所有的头文件.但我也必须链接到库.但我不知道该怎么做.我尝试使用这样的东西:

So my Project is now able to find all the header Files. But I also have to link against the libary. But I dont know how to do so. I tried using something like this:

LIBS  += -L /usr/local/qwt-6.1.0/lib -lqwt

但我得到一个名为找不到 -lqwt 的库"的错误.

But than I get an error called "libary not found for -lqwt".

我做错了什么?如何链接库或如何将 qwt 框架导入到我的项目中?

What I am doing wrong? How can I link against the library or how could I import the qwt framework into my project?

推荐答案

我找到了解决方案.以下是有关如何在 Mac OS X 下安装 QWT 6.1.0 并使其在 QT-Creator 中运行的分步指南:

I found a solution. Here is a step by step guide on how to install QWT 6.1.0 under Mac OS X and get it running inside the QT-Creator :

  1. 从这里下载 .tar.bz2 http://sourceforge.net/projects/qwt/files/qwt/6.1.0/
  2. 将其提取到您想要的位置,例如在您的下载文件夹中
  3. 然后切换到目录qwt-6.1.0
  4. 然后您必须找到 qmake 命令行工具(您只需在 Finder 中搜索即可.
  5. 然后 qmake qwt.pro 文件如 /Applications/QT/5.1.0/clang_64/bin/qmake qwt.pro
  6. 制作
  7. sudo 安装
  8. 在您的 QT 项目中,您必须将以下行添加到.pro 文件 包括 (/usr/local/qwt-6.1.0/features/qwt.prf)将 QWT 库包含到项目中
  9. 现在你必须像这样创建一个软链接:sudo ln -s/usr/local/qwt-6.1.0/lib/qwt.framework/qwt/usr/lib/qwt

就是这样.QWT 现在应该可以工作了.

Thats it. QWT now should work.

在小牛队下:

如果您使用 Mavericks,则必须手动将 qwt.framework 复制到 Libary/Frameworks 文件夹,以免出现dyld:未加载库:libqwt.6.dylib"错误.我不知道为什么,但它可以工作.

If you are using Mavericks you have to manually copy the qwt.framework to Libary/Frameworks folder for not getting the "dyld: Library not loaded: libqwt.6.dylib" error .. i dont know why but it works.

这篇关于Mac OS X下安装和使用QWT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆