cb2的QT+openGL
本帖最后由 liucheng 于 2016-5-9 13:17 编辑我首先说明目的。要在cb2 上安装QT和openGL。
一,调试好openGL。
参考http://linux-sunxi.org/Mali_binary_driver
运行test,效果如图:
二,我编译qt,成功了。过程如下。
1.在cb2上编译qt 需要安装一些库
1.格式化u盘为exit3格式, 拷贝 qt-everywhere-opensource-src-4.8.6.tar.gz到U盘,解压qt-everywhere-opensource-src-4.8.6.tar.gz到u盘。(为什么要拷贝到u盘,因为我发现如果把qt-everywhere-opensource-src-4.8.6.tar.gz直接拷贝到cb2,那么cb2 的空间会不够使用)
2 编译qt,其实很简单,直接 cd qt-everywhere-opensource-src-4.8.6/
输入: ./configure -opengl
http://www.cubie.cc/forum.php?mod=image&aid=3848&size=300x300&key=892caac1131185d1&nocache=yes&type=fixnone
输入:o
完成配置以后直接make -j4
就可以开始编译了。
完成编译以后直接make install 完成qt安装
最后看看:/usr/local/Trolltech/Qt-4.8.6
发现有就说明安装成功了。
三,测试一下,最简单的hello 效果。
qmake
make
./hello
QT是成功的。
四测试一次qt-openGL吧。
cdqt-everywhere-opensource-src-4.8.6/examples/opengl/hellogl_es2
qmake
make
./hellogl_es2
好了,,,,,,,失败了。。。。。段错误。。。。。。。。。。。。。。。。。。。。
有解吗???
:)有人搞过吗? :L难道没有人搞过。。。。。。。。。。。。。。。。。。:( liucheng 发表于 2016-5-9 14:25 static/image/common/back.gif
难道没有人搞过。。。。。。。。。。。。。。。。。。
QT可以参考:http://pan.baidu.com/s/1jGEFvBC#path=%252FDevelopment%252FQT liucheng 发表于 2016-5-9 14:25 static/image/common/back.gif
难道没有人搞过。。。。。。。。。。。。。。。。。。
1. 你用的那个发行版?(给出下载链接,主要是看看OPENGLES对接好没,可以试试跑glmark2-es2能否跑过)
2. 关于编译选项, /configure -opengl 看看能否换成 -opengles 。虽然你跑的opengl里面es测试程序。 毕竟cb2只支持opengles,不支持opengl。 蓝天-彭 发表于 2016-5-9 16:07 static/image/common/back.gif
QT可以参考:http://pan.baidu.com/s/1jGEFvBC#path=%252FDevelopment%252FQT
这个是很有参考价值,但是嗯。。。。我qt已经编译好了,可以在板子上运行hello了。。。主要是qt+openGL不行,但是单独运行openGL是可以的。 liucheng 发表于 2016-5-10 17:16 static/image/common/back.gif
这个是很有参考价值,但是嗯。。。。我qt已经编译好了,可以在板子上运行hello了。。。主要是qt+openGL不 ...
root@superpi3:/mnt/qt-everywhere-opensource-src-4.8.6# ./configure -opengles
Which edition of Qt do you want to use ?
Type 'c' if you want to use the Commercial Edition.
Type 'o' if you want to use the Open Source Edition.
o
-opengles: invalid command-line switch
你可以看到。。。。。这个-opengles: invalid command-line switch,选项是非法的。。。qt只有opengl这个选项我看过他的help文件了。。。。。
liucheng 发表于 2016-5-10 17:34 static/image/common/back.gif
root@superpi3:/mnt/qt-everywhere-opensource-src-4.8.6# ./configure -opengles
Which edition of Qt d ...
我的版本就是 4.8.6呗。。 liucheng 发表于 2016-5-10 17:34 static/image/common/back.gif
root@superpi3:/mnt/qt-everywhere-opensource-src-4.8.6# ./configure -opengles
Which edition of Qt d ...
我的版本就是 4.8.6呗。。 liucheng 发表于 2016-5-10 17:16 static/image/common/back.gif
这个是很有参考价值,但是嗯。。。。我qt已经编译好了,可以在板子上运行hello了。。。主要是qt+openGL不 ...
root@superpi3:/mnt/qt-everywhere-opensource-src-4.8.6# ./configure -opengles
Which edition of Qt do you want to use ?
Type 'c' if you want to use the Commercial Edition.
Type 'o' if you want to use the Open Source Edition.
o
-opengles: invalid command-line switch
你可以看到。。。。。这个-opengles: invalid command-line switch,选项是非法的。。。qt只有opengl这个选项我看过他的help文件了。。。。。