在Mac OS X下安装和使用QWT

编程入门 行业动态 更新时间:2024-10-28 18:35:28
本文介绍了在Mac OS X下安装和使用QWT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我目前正在尝试使QWT 6.1.0在MAC OS X 10.7.5下运行. 我按照此处的说明进行操作-> qwt.sourceforge/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 --> qwt.sourceforge/qwtinstall.html I didn't changed something inside the configuration files.

所以一切正常,但是现在我想在自己的Project中使用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 :

  • 从此处.tar.bz2 . > sourceforge/projects/qwt/files/qwt/6.1.0/
  • 将其提取到所需位置,例如在下载文件夹中
  • 然后转到目录 qwt-6.1.0
  • 然后,您必须找到qmake命令行工具(可以通过在Finder中简单地搜索它来实现.
  • 然后使用qmake qwt.pro文件,例如/Applications/QT/5.1.0/clang_64/bin/qmake qwt.pro
  • 制作
  • sudo进行安装
  • 在您的QT项目中,您必须将以下行添加到 .pro文件 include(/usr/local/qwt-6.1.0/features/qwt.prf) 将QWT库纳入Project
  • 现在,您必须创建这样的软链接: sudo ln -s /usr/local/qwt-6.1.0/lib/qwt.framework/qwt/usr/lib/qwt
  • Download the .tar.bz2 from here sourceforge/projects/qwt/files/qwt/6.1.0/
  • Extract it where you want, for Example inside your Download-Folder
  • Then change into the directory qwt-6.1.0
  • Then you have to locate the qmake command line tool ( you can do so by simply searchng for it inside the Finder.
  • Then qmake the qwt.pro File like /Applications/QT/5.1.0/clang_64/bin/qmake qwt.pro
  • make
  • sudo make install
  • Inside your QT Project you have to add the following line to the .pro File include ( /usr/local/qwt-6.1.0/features/qwt.prf ) includes QWT libary into Project
  • Now you have to create a softlink like this : 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

    本文发布于:2023-10-23 12:18:37,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1520796.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:Mac   OS   QWT

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!