T3 Embedded 编译过程中出错的解决方法
来源:互联网 发布:网络童装代理 编辑:程序博客网 时间:2024/04/28 20:35
QT3 Embedded 编译过程中出错的解决方法
参数配置
./configure -embedded arm -xplatform qws/linux-arm-g++ -static -depths 4,8,16,32 -thread -qt-mouse-bus -qt-mouse-pc -no-cups -qt-gif
注意:在configure的时候会出现一个警告
WARNING: Failure to find: .moc/release-static-mt-emb-x86/allmoc.cpp
关于这个问题官方已经给出答案,引用如下
This is not a problem. It happens everytime Qt/embedded is configured.
所以,这个警告可以不预理会。
错误1:../include/qstring.h: In member function 'ushort& QChar::unicode()':
../include/qstring.h:199: error: cannot bind packed field
'((QChar*)this)->QChar::ucs' to 'ushort&'
解决办法:
打开src/tools/qglobal.h查找278行,开始修改,红色部分为修改内容
# if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)
# define Q_PACKED __attribute__ ((packed))
# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4
# define Q_NO_PACKED_REFERENCE
# endif
# if __GNUC__ == 4 && __GNUC_MINOR__ >= 0
# define Q_NO_PACKED_POINTERS
# endif
# endif
# if !defined(__EXCEPTIONS)
# define Q_NO_EXCEPTIONS
# endif
打开include/qstring.h查看185行
修改如下:
ushort unicode() const { return ucs; }
#ifdef Q_NO_PACKED_REFERENCE
ushort &unicode() { return *(&ucs); }
#elif defined Q_NO_PACKED_POINTERS
ushort &unicode() { ushort &tmp = ucs; return tmp; }
#else
ushort &unicode() { return ucs; }
#endif
#ifndef QT_NO_CAST_ACSII
错误2:
qsortedlist.h:52: error: there are no arguments to 'clear' that depend on a template parameter, so a declaration of 'clear' must be available
解决方法:打开include/qsortedlist.h
把52行改为:~QsortedList() {this->clear();}
错误3:
dialogs/qprintdialog.cpp:766:23: error: cups/cups.h: No such file or directory
解决方法:在参数配置时 加上 –no-cups
错误4:
launcher.cpp:158: error: missing terminating " character
解决方法:打开example/launcher/launcher.cpp
字符串换行后,在编译时错误,把字符串调整到一行就可以了。
错误5:
embedded/qgfxvfb_qws.cpp:292: error: 'gfx_screen' was not declared in this scope
解决方法:把gfx_screen改为this->gfx_screen,原因是用高版本的gcc编译低版本的qt就会出这样的问题。类似这个没有声明的错误在前面加this->就可以了。
接下来就是make clean
make
我们先来查看文件信息:
[root@localhost lib]# file libqte-mt.so.3.3.8
libqte-mt.so.3.3.8: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), not stripped
此时显示的是not stripped,即没有经过strip。
[root@localhost lib]# arm-none-linux-gnueabi-strip libqte-mt.so.3.3.8
执行strip命令之后我们再次查看文件信息:
[root@localhost lib]# file libqte-mt.so.3.3.8
libqte-mt.so.3.3.8: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), stripped
此时显示的是stripped,即已经strip。你会发现,strip之后libqte-mt.so.3.3.8发生明显变化的,不过在实际的开发过程中,我们是不提倡这样做的,因为使用strip后,使用gdb时就无法获得调试信息了。故,在开发过程,我们为了方便以后的调试最好不要strip。
后记:因为是初步交*编译,所以触摸屏支持和字体库的添加,中文支持,如何添加wenquanyi字体等等,还有库的裁减都没有具体实现,不过完成后我会继续写出来,与大家分享!另外,很多地方我懒得注释,因为很多知识都是交*编译的基础只是,请读者自己理解!这也是一个学习的过程。
- T3 Embedded 编译过程中出错的解决方法
- Xcode8中CoreData编译出错的解决方法
- 编译opencv出错的解决方法
- Thuthesis在Tex live2015中编译出错的解决方法
- fast-rcnn中编译cudnn出错解决方法
- GCC编译过程中出错问题总结
- shlobj.h编译出错的解决方法!
- 部分linux编译ssl出错的解决方法
- 部分vc程序编译出错的解决方法
- 编译stuntd 的时候出错信息+解决方法
- VS2008 fstream 编译出错的解决方法
- nrf52 sdk第一次编译出错的解决方法
- poj编译不通过,运行出错的解决方法
- linux内核编译过程中出现两个错误的解决方法~!
- 编译过程中碰到的几个小问题和解决方法
- Maven编译过程中Java heap space问题的解决方法
- CUDA程序编译过程中产生警告的解决方法
- PHP编译过程中常见错误信息的解决方法
- 机器学习 支持向量机(SVM)
- 欣闻《C语言从入门到精通》已经隆重出版
- 关于socket的一点思考——外网连接内网?
- VC6.0中,用MFC的单文档,写的[拼图游戏]----自我解析
- JSP设计模式 [转载]
- T3 Embedded 编译过程中出错的解决方法
- 模仿无罪 分享万岁
- 如何判断一个form是否被关闭
- 双线性插值
- 队列之顺序队列
- pom reference 笔记
- ARM Linux编译链接过程分析
- 单例模式在脑图项目中的运用
- Ubuntu VirtualBox中实现文件夹共享