编译qt4.8.1时出现错误 error: 'union' tag used in naming 'struct _GMutex'
2016-06-30 11:18
609 查看
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_17479189/article/details/51788828
阅读更多
环境: ubuntu12 64位
问题:编译qt4.8.1 时出现错误
> /usr/local/include/glib-2.0/glib/gthread.h:51: error: 'union' tag used in naming 'struct _GMutex'
> /usr/local/include/glib-2.0/glib/gthread.h:58: error: 'union' tag used in naming 'struct _GMutex'
分析:
union ( 共用体):构造数据类型,也叫联合体
用途:使几个不同类型的变量共占一段内存(相互覆盖)
struct ( 结构体 ):是一种构造类型
用途: 把不同的数据组合成一个整体——自定义数据类型
这个是版本问题,glib-2.0 将_GMutex的类型由struct 改为union, 而webkit的版本还没有跟着更新,导致编译出现错误。
解决方法:
修改gthread.h
union _GMutex 改为 struct _GMutex
阅读更多
相关文章推荐
- Qt5.x 编译QWebenginewidgets出现错误Project ERROR: Unknown module(s) in QT: webenginewidgets
- 【原创】QT:编译时出现 “error: error writing to -: Invalid argument”错误的解决
- 编译内核模块出现error: negative width in bit-field 错误
- CoovaChilli-1.3.0编译时出现main-opt.c:781: error: ‘ptr’ may be used uninitialized in this function的解决方法
- VS2015 + QT 编译出现public: virtual struct QMetaObject const * __thiscall 错误
- 编译内核模块出现error: negative width in bit-field 错误
- 【OC易错】Xcode5.0新建OS X下的cmd工程后出现编译错误clang: error: invalid version number in '-mmacosx-version-min=
- linux/x11下编译Qt4.8可能出现的错误解决办法
- MySQL 编译出现 error: 'SSL_OP_NO_COMPRESSION' undeclared (first use in this function) 错误
- Qt 4.8 + vs2008 + opencv 2.3 出现编译错误
- 编译php5.4的时候出现错误----configure: error: in `/usr/local/src/php540/php-5.4.0':
- CoovaChilli-1.3.0编译时出现main-opt.c:781: error: ‘ptr’ may be used uninitialized in this function的解决方法
- Qt 编译时出现“-1: error: LNK2019: unresolved external symbol "public: void __thiscall M”错误
- Keil4编译原子哥的SYSTEM出现错误error: #1113: Inline assembler not permitted when generating Thumb cod
- QT + VS2005 编译出现 error LNK2001: 无法解析的外部符号 "public: virtual struct QMetaObject const * __thiscall Widget::metaObject 错误
- ubuntu16.04下编译qt5。5程序出现:-1: error: [ui_firstpage.h] Error 1 错误的解决
- 编译内核模块出现error: negative width in bit-field 错误
- QT5.2中新建lib库,在引用时出现error LNK2019: 无法解析的外部符号错误
- QT引用OpenCV出现错误:warpers_inl.hpp:146: error: C2589: “(”:“::”右边的非法标记
- JNI_OnLoad编译错误:request for member 'GetEnv' in something not a structure or union