C++ 在linux ubuntu上运行Qt5中的qwt示例
我不知道运行使用Qwt库的示例程序需要做什么 我像往常一样从下载目录下载文件C++ 在linux ubuntu上运行Qt5中的qwt示例,c++,linux,qt,makefile,qwt,C++,Linux,Qt,Makefile,Qwt,我不知道运行使用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 在
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中找不到任何内容:
请帮助。以下方法对我很有用:
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
成功了,谢谢。我如何测试它?我看到一些例子需要在pro文件中添加行,比如include或libfrom/usr/local???我没有qwt目录。接下来的步骤是什么?它已经成功了,我非常感谢更多的帮助-这面旗帜能做什么?我尝试在我的arm编译器中编译它,但没有成功。shuold我是用原价还是原价换的?我已经在我的机器上安装了arm编译器,它在我的qtcreator上运行得很好,但是我无法在命令行中运行它。我运行了这个命令,但是文件仍然编译为x86/opt/Qt5.4.1/5.4/gcc_64/bin/qmake qmake_CC=/opt/poky qt/1.6.2/sysroot/x86_64-pokysdk-linux/usr/bin/arm poky linux-gnueabi/arm-poky-linux-gnueabi-g++qwt.pro-o build/Makefile qwt_CONFIG=“QwtExamples”