在linux ubuntu的Qt 5中运行qwt示例
run qwt example in Qt 5 on linux ubuntu
我不知道我需要做什么来运行使用Qwt库的示例程序。
我像往常一样从这里下载文件qwt-6.1.2.tar.bz2
,它进入下载目录,我将文件解压缩到这个目录。我现在在下载目录中有qwt-6.1.2
目录。
Qt目录在我的机器位于/opt/Qt5.4.1/
我如何从这里继续?
我尝试运行qmake:
natile@natile-Precision-T1650:/opt/Qt5.4.1/5.4/gcc_64/bin$ sudo ./qmake /home/natile/Downloads/qwt-6.1.2/qwt.pro
然后我运行make:
natile@natile-Precision-T1650:/opt/Qt5.4.1/5.4/gcc_64/bin$ sudo make
但是我得到一个错误:
cd src/ && ( test -e Makefile || /opt/Qt5.4.1/5.4/gcc_64/bin/qmake /home/natile/Downloads/qwt-6.1.2/src/src.pro -o Makefile ) && make -f Makefile
make[1]: Entering directory `/opt/Qt5.4.1/5.4/gcc_64/bin/src'
compiling /home/natile/qtcreator-projects/qwt/qwt-5.2/src/qwt_abstract_scale_draw.cpp
In file included from /home/natile/qtcreator-projects/qwt/qwt-5.2/src/qwt_abstract_scale_draw.cpp:19:0:
/home/natile/qtcreator-projects/qwt/qwt-5.2/src/qwt_scale_map.h:92:5: error: ‘QT_STATIC_CONST’ does not name a type
/home/natile/qtcreator-projects/qwt/qwt-5.2/src/qwt_scale_map.h:93:5: error: ‘QT_STATIC_CONST’ does not name a type
make[1]: *** [obj/qwt_abstract_scale_draw.o] Error 1
make[1]: Leaving directory `/opt/Qt5.4.1/5.4/gcc_64/bin/src'
make: *** [sub-src-make_first-ordered] Error 2
我明白我必须运行qmake.
安装URL: http://qwt.sourceforge.net/qwtinstall.html
请帮。
下面的方法很适合我:
cd /home/natile/Downloads/qwt-6.1.2/
mkdir build
/opt/Qt5.4.1/5.4/gcc_64/bin/qmake qwt.pro -o build/Makefile QWT_CONFIG="QwtExamples"
cd build
make
cd examples/bin
# Now you can launch any example, like:
./dials
相关文章:
- 运行同一解决方案的另一个项目的项目
- CMake-按正确顺序将项目与C运行时对象文件链接
- 如何运行位于boost/libs/python/example/tutorial目录中的hello.cpp和Jamfil
- 代码在main()中运行,但在函数中出现错误
- 我在c++代码中生成了一个运行时#3异常
- 如何在linux终端中同时编译和运行c++代码
- 为什么在运行时没有向我们提供有关分段错误的更多信息?
- 如何在运行中期切换GTK CSS style_context
- 如何在MS Visual Studio 2019中运行QT UI
- 如何通过cpp程序运行shell脚本
- IPC使用多个管道和分支进程来运行Python程序
- 删除指向指针的指针是运行时错误吗
- 如何用参数值调用函数(仅在运行时已知)
- 为什么即使使用-cudart-static进行编译,库用户仍然需要链接到cuda运行时
- 是否可以在编译时初始化数组,以便在运行时不会花费时间?
- c++中的指针和运行时错误
- 在C应用程序中运行C++(带有STL)函数
- 带有QWT运行时错误的QT:QWIDGET:必须在Qwidget之前构造Qapplication
- 运行 QWT 示例程序 (.pro) 与 Visual Studio 2010 错误
- 在linux ubuntu的Qt 5中运行qwt示例