本文介绍了在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.htmlI 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 :

  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文件 include(/usr/local/qwt-6.1.0/features/qwt.prf) 将QWT库纳入Project
  9. 现在,您必须创建这样的软链接: sudo ln -s/usr/local/qwt-6.1.0/lib/qwt.framework/qwt/usr/lib/qwt
  1. Download the .tar.bz2 from here http://sourceforge.net/projects/qwt/files/qwt/6.1.0/
  2. Extract it where you want, for Example inside your Download-Folder
  3. Then change into the directory qwt-6.1.0
  4. Then you have to locate the qmake command line tool ( you can do so by simply searchng for it inside the Finder.
  5. Then qmake the qwt.pro File like /Applications/QT/5.1.0/clang_64/bin/qmake qwt.pro
  6. make
  7. sudo make install
  8. 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
  9. 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-08 06:38