首页 > 其他 > 详细

QT5 r 加入qwtplot3d 三维库

时间:2015-03-27 14:23:55      阅读:535      评论:0      收藏:0      [点我收藏+]
 
 
 
qwtplot3d是基于QtOpenGL开发的,也是qwt库的三维库,我使用的是qwtplot3d-0.2.7.zip版本。

 

步骤跟编译qwt库一样(不明白可以看回前面写的一篇文章“QT5 qtcreator 加入qwt画图插件”),下面我把一些编译的问题汇总一下:

1)

include/qwt3d_openglhelper.h:8:26: fatal error: QtOpenGL/qgl.h: 没有那个文件或目录
 #include <QtOpenGL/qgl.h>

解决方案:
 ///// sudo apt-get install libqt5opengl5*


2)
include/qwt3d_openglhelper.h: In function ‘const GLubyte* Qwt3D::gl_error()’:
include/qwt3d_openglhelper.h:67:31: error: ‘gluErrorString’ was not declared in this scope
   err = gluErrorString(errcode);

解决方案:
   /////  在include/qwt3d_openglhelper.h这个文件里添加 #include <GL/glu.h>
   /////  记事本打开 qwtplot3d.pro , 在最前面输入下面这一句  LIBS += -lGLU



3)

解决方案:
打开./examples/mesh2/src/designerworkaround.h
#include <QtGui/QMenu> ==> #include <QMenu>
 .... 
  /////  去掉"QtGui/" 

 

 

最后安装一下编译出来的库:

sudo mkdir -p /usr/local/qwtplot3d
sudo cp -rf lib /usr/local/qwtplot3d
sudo ln -s /usr/local/qwtplot3d/lib/libqwtplot3d.so.0 /usr/lib/libqwtplot3d.so.0

QT5 r 加入qwtplot3d 三维库

原文:http://www.cnblogs.com/lvdongjie/p/4371551.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!