qt-mysql driver conflits with Webkit on compilation
来源:互联网 发布:淘宝公司运营模式 编辑:程序博客网 时间:2024/04/28 20:10
When i compliing mysql driver for qt47 in mac os, an error is threw :
> bindings/js/JSPluginCustom.cpp:38: error: invalid use of incomplete type > ‘struct WebCore::Plugin’> generated/JSPlugin.h:30: error: forward declaration of ‘struct > WebCore::Plugin’> make[2]: *** [.obj/debug-shared/JSPluginCustom.o] Error 1> make[1]: *** [debug-all] Error 2> make: *** [sub-webkit-make_default-ordered] Error 2
read the source code, found the reason is there r two Plugin.h header file in the g++ include path.
one is from qt source at $QTDIR/src/3rdparty/webkit/WebCore/plugins/Plugin.h and the other is come from the mysql header files.
in the file where the exception threw, the code
class Plugin;is ambiguous.
I search the web for more infomation but there are only 2 way to solve this problem.
one is the macport provide an diff file for their own qt-mac package installer, so it is not general solution.
and the other way is remove the plugin.h. owned by mysql-source but only configure -release can make succ, the -debug or -release-and-debug mode remain wrongs.
it's terrible if i dev my project under an non-debug-tools-env.
after serveral hours i found a way to solve this boring problem, compiled the qt with mysql driver under the -release-and-debug mode in MacOs.
the solution is rough but it really Works correctly!
1.certainly u should backup your mysql header files first.
2.copy the content of the qt's Plugin.h and paste it into the mysql's plugin.h
(Notice : only one file is modified : the mysql plugin.h which is include by configure -Ixxxx )
3.copy the mysql header files into the qt directory. The the files structure in this directory would like this :
$QTDIR/src/3rdparty/webkit/WebCore/plugins/
Plugin.h
....
mysql/
plugin.h
other mysql headers such as services.h
coz mysql plugin.h would #include "mysql/services.h" and some others, so solve it directly by `cp`.
4.qt configure & make & make install. waiting for the qt make result.
- qt-mysql driver conflits with Webkit on compilation
- Qt 4.5 and MySQL-plugin with Mingw on Windows XP
- Qt 5.1.0 on Ubuntu Linux, MySQL数据库报错 (driver not loaded)
- 【已解决】Qt 5.7.0 on Ubuntu, MySQL数据库报错 (driver not loaded)
- How to build webkit with vs2005 on windows
- (翻译)Building WebKit on Windows 7 with VS2010
- Qt QtDBus compilation
- webkit与qt webkit
- qt creator using mysql plugin(driver install)
- qt 连接mysql driver not loaded错误
- with MySQL on another drive
- Ubuntu16.04 QT "QMYSQL driver not loaded on Ubuntu"问题
- Compilation errors on restricted classes
- mysql:Error while performing database loggin with the mysql driver
- myeclipse error while performing database login with the MySQL driver
- Error while performing database login with the mysql driver
- Ruby On Rails connect with MySQL
- IllegalStateException: Did not find registered driver with class com.mysql.jdbc.Driver
- Linux文件系统及目录
- 配置有线和无线网络笔记linux欢迎大家拍砖
- Linux下tftp服务配置--简单笔记
- 雷军:确实真小米绝非伪苹果
- 设置vim语法高亮显示和自动缩进
- qt-mysql driver conflits with Webkit on compilation
- Linux下挂载服务器
- 二单元Five
- Windows Server XP VISTA WIN7 远程桌面连接设置方法
- SIP Presence (二)
- ssh问题:ssh_exchange_identification: Connection closed by remote host
- 用HTML判断IE版本 (转)
- 时间转换
- Linux硬件信息查询汇总一览