Accessing Webkit classes from Qt project 4.8.0, starting with MSVC 2010.
-
I want to access all of the WebCore classes from a Qt project, starting with Element.
Examples of why:- Access all nodes including text nodes
- want to access the renderer for a node to get layout info
Thought this post was relevant but wrong platform, out of date, does not work with MSVC 2010, and had to add DEFINES such as BUILDING_QT_, but I'm still getting compile errors that I don't have the skills to fix.
www.pareis.com/2010/03/23/accessing-the-original-webkit-api-in-qtwebkit-hybrid-appsIf anyone has proven way of achieving this in Qt, or suggestions for change to Qt source, cool! Otherwise anyone done this?
-
NOT linking to WebCore.lib and JSCore.lib (snippet)
Error 37 error LNK1120: 36 unresolved externals R:\QtSDK\Examples\4.7\webkit\imageanalyzer\release\imageanalyzer.exe imageanalyzer
Error 31 error LNK2001: unresolved external symbol "private: static struct JSC::ClassInfo const JSC::JSString::s_info" (?s_info@JSString@JSC@@0UClassInfo@2@B) R:\QtSDK\Examples\4.7\webkit\imageanalyzer\mainwindow.obj imageanalyzer
Error 24 error LNK2001: unresolved external symbol "private: virtual bool __thiscall JSC::JSCell::getOwnPropertySlot(class JSC::ExecState *,class JSC::Identifier const &,class JSC::PropertySlot &)" (?getOwnPropertySlot@JSCell@JSC@@EAE_NPAVExecState@2@ABVIdentifier@2@AAVPropertySlot@2@@Z) R:\QtSDK\Examples\4.7\webkit\imageanalyzer\mainwindow.obj imageanalyzer
Error 23 error LNK2001: unresolved external symbol "private: virtual bool __thiscall JSC::JSCell::getOwnPropertySlot(class JSC::ExecState *,unsigned int,class JSC::PropertySlot &)" (?getOwnPropertySlot@JSCell@JSC@@EAE_NPAVExecState@2@IAAVPropertySlot@2@@Z) R:\QtSDK\Examples\4.7\webkit\imageanalyzer\mainwindow.obj imageanalyzer
Error 20 error LNK2001: unresolved external symbol "public: virtual bool __thiscall JSC::JSCell::deleteProperty(class JSC::ExecState *,class JSC::Identifier const &)" (?deleteProperty@JSCell@JSC@@UAE_NPAVExecState@2@ABVIdentifier@2@@Z) R:\QtSDK\Examples\4.7\webkit\imageanalyzer\mainwindow.obj imageanalyzer
Error 19 error LNK2001: unresolved external symbol "public: virtual bool __thiscall JSC::JSCell::deleteProperty(class JSC::ExecState *,unsigned int)" (?deleteProperty@JSCell@JSC@@UAE_NPAVExecState@2@I@Z) R:\QtSDK\Examples\4.7\webkit\imageanalyzer\mainwindow.obj imageanalyzer
Error 12 error LNK2001: unresolved external symbol "public: virtual bool __thiscall JSC::JSCell::getPrimitiveNumber(class JSC::ExecState *,double &,class JSC::JSValue &)" (?getPrimitiveNumber@JSCell@JSC@@UAE_NPAVExecState@2@AANAAVJSValue@2@@Z) R:\QtSDK\Examples\4.7\webkit\imageanalyzer\mainwindow.obj imageanalyzer
Error 10 error LNK2001: unresolved external symbol "public: virtual bool __thiscall JSC::JSCell::getUInt32(unsigned int &)const " (?getUInt32@JSCell@JSC@@UBE_NAAI@Z) R:\QtSDK\Examples\4.7\webkit\imageanalyzer\mainwindow.obj imageanalyzer -
Linking to JSCore.lib
1>jscore.lib(JSString.obj) : error LNK2005: "private: virtual class JSC::JSValue __thiscall JSC::JSString::toPrimitive(class JSC::ExecState *,enum JSC::PreferredPrimitiveType)const " (?toPrimitive@JSString@JSC@@EBE?AVJSValue@2@PAVExecState@2@W4PreferredPrimitiveType@2@@Z) already defined in QtWebKit4.lib(QtWebKit4.dll)
1>jscore.lib(JSString.obj) : error LNK2005: "private: virtual bool __thiscall JSC::JSString::toBoolean(class JSC::ExecState *)const " (?toBoolean@JSString@JSC@@EBE_NPAVExecState@2@@Z) already defined in QtWebKit4.lib(QtWebKit4.dll)
1>jscore.lib(JSString.obj) : error LNK2005: "private: virtual class JSC::JSObject * __thiscall JSC::JSString::toObject(class JSC::ExecState *,class JSC::JSGlobalObject *)const " (?toObject@JSString@JSC@@EBEPAVJSObject@2@PAVExecState@2@PAVJSGlobalObject@2@@Z) already defined in QtWebKit4.lib(QtWebKit4.dll)
1>jscore.lib(JSString.obj) : error LNK2005: "private: virtual class JSC::JSObject * __thiscall JSC::JSString::toThisObject(class JSC::ExecState *)const " (?toThisObject@JSString@JSC@@EBEPAVJSObject@2@PAVExecState@2@@Z) already defined in QtWebKit4.lib(QtWebKit4.dll)
1>jscore.lib(JSString.obj) : error LNK2005: "private: void __thiscall JSC::JSString::resolveRope(class JSC::ExecState *)const " (?resolveRope@JSString@JSC@@ABEXPAVExecState@2@@Z) already defined in QtWebKit4.lib(QtWebKit4.dll)
1>jscore.lib(JSString.obj) : error LNK2005: "public: class JSC::JSString * __thiscall JSC::JSString::getIndexSlowCase(class JSC::ExecState *,unsigned int)" (?getIndexSlowCase@JSString@JSC@@QAEPAV12@PAVExecState@2@I@Z) already defined in QtWebKit4.lib(QtWebKit4.dll)
1>jscore.lib(JSString.obj) : error LNK2005: "private: virtual bool __thiscall JSC::JSString::getPrimitiveNumber(class JSC::ExecState *,double &,class JSC::JSValue &)" (?getPrimitiveNumber@JSString@JSC@@EAE_NPAVExecState@2@AANAAVJSValue@2@@Z) already defined in QtWebKit4.lib(QtWebKit4.dll)
1>jscore.lib(JSString.obj) : error LNK2005: "private: virtual double __thiscall JSC::JSString::toNumber(class JSC::ExecState *)const " (?toNumber@JSString@JSC@@EBENPAVExecState@2@@Z) already defined in QtWebKit4.lib(QtWebKit4.dll)
1>jscore.lib(JSString.obj) : error LNK2005: "private: virtual class JSC::UString __thiscall JSC::JSString::toString(class JSC::ExecState *)const " (?toString@JSString@JSC@@EBE?AVUString@2@PAVExecState@2@@Z) already defined in QtWebKit4.lib(QtWebKit4.dll)
1>jscore.lib(JSString.obj) : error LNK2005: "private: virtual bool __thiscall JSC::JSString::getOwnPropertySlot(class JSC::ExecState *,class JSC::Identifier const &,class JSC::PropertySlot &)" (?getOwnPropertySlot@JSString@JSC@@EAE_NPAVExecState@2@ABVIdentifier@2@AAVPropertySlot@2@@Z) already defined in QtWebKit4.lib(QtWebKit4.dll)
1>jscore.lib(JSString.obj) : error LNK2005: "private: virtual bool __thiscall JSC::JSString::getOwnPropertyDescriptor(class JSC::ExecState *,class JSC::Identifier const &,class JSC::PropertyDescriptor &)" (?getOwnPropertyDescriptor@JSString@JSC@@EAE_NPAVExecState@2@ABVIdentifier@2@AAVPropertyDescriptor@2@@Z) already defined in QtWebKit4.lib(QtWebKit4.dll)
1>jscore.lib(JSString.obj) : error LNK2005: "private: virtual bool __thiscall JSC::JSString::getOwnPropertySlot(class JSC::ExecState *,unsigned int,class JSC::PropertySlot &)" (?getOwnPropertySlot@JSString@JSC@@EAE_NPAVExecState@2@IAAVPropertySlot@2@@Z) already defined in QtWebKit4.lib(QtWebKit4.dll)
1> Creating library release\imageanalyzer.lib and object release\imageanalyzer.exp
1>jscore.lib(CurrentTime.obj) : error LNK2001: unresolved external symbol __imp__timeEndPeriod@4
1>jscore.lib(CurrentTime.obj) : error LNK2001: unresolved external symbol __imp__timeBeginPeriod@4