成功编译QtWeb3.7.5

来源:互联网 发布:互联网程序员 编辑:程序博客网 时间:2024/06/16 18:51

原创分享,转载注明出处

错误1、ushort to wchar

mingw32-make.exe[1]: *** No rule to make target `C:\QtSDK\Desktop\Qt\4.7.4\mingw\/src/3rdparty/webkit/Source/WebCore/inspector/front-end/WebKit.qrc', needed by `tmp/rcc/debug_static/qrc_WebKit.cpp'.  Stop.
mingw32-make.exe: *** [debug] Error 2

加强制转换(wchar*)


错误2、缺少WebCore.qrc
tmp/rcc/debug_static/qrc_WebCore.cpp: C:\QtSDK\QtSources\4.7.4\src\3rdparty\webkit\WebCore\WebCore.qrc
 c:\QtSDK\Desktop\Qt\4.7.4\mingw\bin\rcc.exe -name WebCore C:\QtSDK\QtSources\4.7.4\src\3rdparty\webkit\WebCore\WebCore.qrc -o tmp\rcc\debug_static\qrc_WebCore.cpp

tmp/rcc/debug_static/qrc_WebKit.cpp: C:\QtSDK\QtSources\4.7.4\src\3rdparty\webkit\WebCore\inspector\front-end\WebKit.qrc
 c:\QtSDK\Desktop\Qt\4.7.4\mingw\bin\rcc.exe -name WebKit C:\QtSDK\QtSources\4.7.4\src\3rdparty\webkit\WebCore\inspector\front-end\WebKit.qrc -o tmp\rcc\debug_static\qrc_WebKit.cpp

在QtSDK中搜索WebCore.qrc,加到指定目录中


错误3、同2

RCC: Error in 'C:\QtSDK\QtSources\4.7.4\src\3rdparty\webkit\WebCore\inspector\front-end\WebKit.qrc': Cannot find file 'InspectorBackendStub.js'
mingw32-make.exe[1]: *** [tmp/rcc/debug_static/qrc_WebKit.cpp] Error 1
InspectorFrontendHostStub.js

错误4、

搜索qcncodecsd,修改makefile,添加该库,结果不行,注释掉 静态编译 Q_IMPORT_PLUGIN(qcncodecs)
-I"C:\QtSDK\Simulator\Qt\mingw\plugins\codecs"
c:/qtsdk/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot find -lqcncodecsd
collect2: ld returned 1 exit status


错误5、 修改Makefiel.Debug 或.release 在LIBS = 后添加  -L"C:\QtSDK\mingw\lib" -lole32

./debug\bookmarksimport.o:E:\myproject\QtWeb/bookmarksimport.cpp:143: undefined reference to`CoInitialize@4'
./debug\main.o: In function `StaticqjpegPluginInstance':
E:\myproject\QtWeb/main.cpp:44: undefined reference to `qt_plugin_instance_qjpeg()'
./debug\main.o: In function `StaticqgifPluginInstance':
E:\myproject\QtWeb/main.cpp:45: undefined reference to `qt_plugin_instance_qgif()'
./debug\main.o: In function `Staticqcncodecs4PluginInstance':
E:\myproject\QtWeb/main.cpp:53: undefined reference to `qt_plugin_instance_qcncodecs4()'
./debug\main.o: In function `Staticqjpcodecs4PluginInstance':
E:\myproject\QtWeb/main.cpp:54: undefined reference to `qt_plugin_instance_qjpcodecs4()'
./debug\main.o: In function `Staticqkrcodecs4PluginInstance':
E:\myproject\QtWeb/main.cpp:55: undefined reference to `qt_plugin_instance_qkrcodecs4()'
./debug\main.o: In function `Staticqtwcodecs4PluginInstance':
E:\myproject\QtWeb/main.cpp:56: undefined reference to `qt_plugin_instance_qtwcodecs4()'
collect2: ld returned 1 exit status
mingw32-make.exe[1]: *** [debug\QtWeb.exe] Error 1
mingw32-make.exe: *** [debug] Error 2

 
./release\bookmarksimport.o:bookmarksimport.cpp:(.text+0xcf3): undefined reference to`CoInitialize@4'
collect2: ld returned 1 exit status
mingw32-make.exe[1]: *** [release\QtWeb.exe] Error 1
mingw32-make.exe: *** [release] Error 2

-L"C:\QtSDK\mingw\lib" -lole32

 

错误6、用qtwebkit编写浏览器,打开网页提示 You need flash above 9.028 or SWFUpload.......

下载最新的Adobe Flash Player插件,需要不是针对ie的插件,针对webkit的,拷贝里面的NPSWF32_11_7_700_169.dll到执行文件目录下,新建目录plugins,放进去,就OK