[Webkit-unassigned] [Bug 88321] [Qt][Win] Fix broken QtWebKit5.lib linking

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 12 00:44:49 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=88321





--- Comment #12 from Csaba Osztrogonac <ossy at webkit.org>  2012-06-12 00:44:48 PST ---
I tried these patches, but unfortunately nothing changed for me.

But I started to understand import/export macros and how 
QtWebKit libraries linking work on Windows.

If I'm correct, we have JavaScriptcore.lib, WTF.lib and WebCore.lib as static 
libraries. And then we try to link QtWebKit5.dll from API objects and from
theses static libraries. In this case we shouldn't use export macros during
building JavaScriptCore, WTF and WebCore _and_ we shouldn't use import macros
during linking QtWebKit5.dll. (As far as I know export/import macros are only
useable for creating/using dlls)

I tried to add "DEFINES += WTF_USE_EXPORT_MACROS=0" to JavaScriptCore.pri,
WebCore.pri and WTF.pri and then I got only 8 unresolved external instead of 36:

qwebframe.obj : error LNK2019: unresolved external symbol __imp__JSValueMakeUndefined referenced in function "struct OpaqueJSValue const * __cdecl qtSenderCallback(struct OpaqueJSContext const *,struct OpaqueJSValue *,struct OpaqueJSValue *,unsigned int,struct OpaqueJSValue const * const * const,struct OpaqueJSValue const * *)" (?qtSenderCallback@@YAPBUOpaqueJSValue@@PBUOpaqueJSContext@@PAU1 at 1IQBQBU1@PAPBU1@@Z)
WebCore.lib(qt_runtime.obj) : error LNK2019: unresolved external symbol __imp__JSValueIsEqual referenced in function "public: bool __thiscall JSC::Bindings::QtConnectionObject::match(struct OpaqueJSContext const *,class QObject *,int,struct OpaqueJSValue *,struct OpaqueJSValue *)" (?match at QtConnectionObject@Bindings at JSC@@QAE_NPBUOpaqueJSContext@@PAVQObject@@HPAUOpaqueJSValue@@2 at Z)
WebCore.lib(ScriptValue.obj) : error LNK2001: unresolved external symbol __imp__JSValueIsEqual
WebCore.lib(qt_runtime.obj) : error LNK2019: unresolved external symbol __imp__JSValueProtect referenced in function "public: __thiscall JSC::Bindings::QtConnectionObject::QtConnectionObject(struct OpaqueJSContext const *,class WTF::PassRefPtr<class JSC::Bindings::QtInstance>,int,struct OpaqueJSValue *,struct OpaqueJSValue *)" (??0QtConnectionObject at Bindings@JSC@@QAE at PBUOpaqueJSContext@@V?$PassRefPtr at VQtInstance@Bindings at JSC@@@WTF@@HPAUOpaqueJSValue@@2 at Z)
WebCore.lib(qt_runtime.obj) : error LNK2019: unresolved external symbol __imp__JSValueUnprotect referenced in function "public: virtual __thiscall JSC::Bindings::QtConnectionObject::~QtConnectionObject(void)" (??1QtConnectionObject at Bindings@JSC@@UAE at XZ)
WebCore.lib(qt_runtime.obj) : error LNK2019: unresolved external symbol __imp__JSValueToNumber referenced in function "public: void __thiscall JSC::Bindings::QtConnectionObject::execute(void * *)" (?execute at QtConnectionObject@Bindings at JSC@@QAEXPAPAX at Z)
WebCore.lib(ImageQt.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) class QPixmap __cdecl WebCore::qt_pixmapFromWinHBITMAP(struct HBITMAP__ *,int)" (__imp_?qt_pixmapFromWinHBITMAP at WebCore@@YA?AVQPixmap@@PAUHBITMAP__@@H at Z) referenced in function "public: static class WTF::PassRefPtr<class WebCore::BitmapImage> __cdecl WebCore::BitmapImage::create(struct HBITMAP__ *)" (?create at BitmapImage@WebCore@@SA?AV?$PassRefPtr at VBitmapImage@WebCore@@@WTF@@PAUHBITMAP__@@@Z)
WebCore.lib(PluginViewWin.obj) : error LNK2019: unresolved external symbol "public: struct HDC__ * __thiscall WebCore::GraphicsContext::getWindowsContext(class WebCore::IntRect const &,bool,bool)" (?getWindowsContext at GraphicsContext@WebCore@@QAEPAUHDC__@@ABVIntRect at 2@_N1 at Z) referenced in function "public: __thiscall WebCore::LocalWindowsContext::LocalWindowsContext(class WebCore::GraphicsContext *,class WebCore::IntRect const &,bool,bool)" (??0LocalWindowsContext at WebCore@@QAE at PAVGraphicsContext@1 at ABVIntRect@1 at _N2@Z)
WebCore.lib(PluginViewWin.obj) : error LNK2019: unresolved external symbol "public: void __thiscall WebCore::GraphicsContext::releaseWindowsContext(struct HDC__ *,class WebCore::IntRect const &,bool,bool)" (?releaseWindowsContext at GraphicsContext@WebCore@@QAEXPAUHDC__@@ABVIntRect at 2@_N2 at Z) referenced in function "public: __thiscall WebCore::LocalWindowsContext::~LocalWindowsContext(void)" (??1LocalWindowsContext at WebCore@@QAE at XZ)


And then I found the reason of JSValue* related unresolved symbols: JSC uses
USE_EXPORT_MACROS instead of WTF_USE_EXPORT_MACROS as export/import macros.
Now I'm trying disable this one too.

PS: I found an old patch (by Simon, r=Tor Arne) enabled import/export macros on Qt - http://trac.webkit.org/changeset/106650 . Could you check it, please?
I think we should enable import/export macros during linking QtWebKit5.dll only, don't we?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list