Unresolved external symbols error when using nextInPreOrder method



  • I am trying to get the location of the hyperlinks from webpage, so i have created a method named QGetRectangle in qwebframe.cpp file. When I use the method “nextInPreOrder” I am getting unresolved external symbols error when trying to build it, which is mentioned below, When I remove “o=o->nextInPreOrder();” it builds successfully. Also I tried rebuilding the whole Qt source, but still the error persists.

    Machine details:
    OS: Windows 8 Pro
    Qt Version : 5.3.1
    Compiler: JOM, MSVC 2010

    File location: qt-5.3.1\qtwebkit\Source\WebKit\qt\WidgetApi\qwebframe.cpp

    I m getting the following error:
    @qwebframe.obj : error LNK2019: unresolved external symbol "public: class WebCore::RenderObject * __thiscall WebCore::RenderObject::nextInPreOrder(void)const " (
    ?nextInPreOrder@RenderObject@WebCore@@QBEPAV12@XZ) referenced in function "public: struct QPair<int,class QRectF> __thiscall QWebFrame::QGetRectangle(class QWeb
    Frame const *,class QPaintDevice *,class QPainter &,class QWebElement const &)"
    (?QGetRectangle@QWebFrame@@QAE?AU?$QPair@HVQRectF@@@@PBV1@PAVQPaintDevice@@AAVQPainter@@ABVQWebElement@@@Z)
    C:\Qt\qt-5.3.1\qtbase\lib\Qt5WebKitWidgetsd.dll : fatal error LNK1120: 1 unresolved externals
    jom: C:\Qt\qt-5.3.1\qtwebkit\Source\Makefile.widgetsapi.Debug [C:\Qt\qt-5.3.1\qt
    base\lib\Qt5WebKitWidgetsd.dll] Error 1120
    jom: C:\Qt\qt-5.3.1\qtwebkit\Source\Makefile.widgetsapi [debug] Error 2
    jom: C:\Qt\qt-5.3.1\qtwebkit\Source\Makefile.QtWebKit [sub-widgetsapi-pri-make_first-ordered] Error 2
    jom: C:\Qt\qt-5.3.1\qtwebkit\Makefile [sub-Source-QtWebKit-pro-make_first-ordered] Error 2
    jom: C:\Qt\qt-5.3.1\Makefile [module-qtwebkit-make_first] Error 2@

    qwebframe.h
    @QPair<int, QRectF> QGetRectangle(const QWebFrame *frame, QPaintDevice *printer, QPainter &painter,const QWebElement & e);@
    qwebframe.cpp
    @QPair<int, QRectF> QWebFrame::QGetRectangle(const QWebFrame *frame, QPaintDevice *printer, QPainter &painter, const QWebElement & e)
    {
    WebCore::RenderObject * o = d->frame->document()->renderer();
    //Error when using this method
    o=o->nextInPreOrder();

    /code snippets removed/
    }@
    Includes
    @#include "config.h"

    #include "BridgeJSC.h"
    #include "CallFrame.h"
    #include "Document.h"
    #include "DocumentLoader.h"
    #include "DragData.h"
    #include "Element.h"
    #include "FocusController.h"
    #include "Frame.h"
    #include "FrameLoaderClientQt.h"
    #include "FrameTree.h"
    #include "FrameView.h"
    #include "GCController.h"
    #include "HTMLMetaElement.h"
    #include "HitTestResult.h"
    #include "HTTPParsers.h"
    #include "IconDatabase.h"
    #include "InspectorController.h"
    #include "JSDOMBinding.h"
    #include "JSDOMWindowBase.h"
    #include "JSLock.h"
    #include "JSObject.h"
    #include "NetworkingContext.h"
    #include "NodeList.h"
    #include "Page.h"
    #include "PlatformMouseEvent.h"
    #include "PlatformWheelEvent.h"
    #include "PutPropertySlot.h"
    #include "RenderLayer.h"
    #include "RenderTreeAsText.h"
    #include "ScriptController.h"
    #include "ScriptSourceCode.h"
    #include "ScriptValue.h"
    #include "Scrollbar.h"
    #include "Settings.h"
    #include "SubstituteData.h"
    #include "SVGSMILElement.h"
    #include "TiledBackingStore.h"
    #include "htmlediting.h"
    #include "markup.h"
    #include "qt_instance.h"
    #include "qt_runtime.h"
    #include "runtime_object.h"
    #include "runtime_root.h"
    #include "wtf/HashMap.h"

    #include "ColumnInfo.h"
    #include "Document.h"
    #include "Element.h"
    #include "FloatQuad.h"
    #include "FlowThreadController.h"
    #include "Frame.h"
    #include "FrameSelection.h"
    #include "FrameView.h"
    #include "GraphicsContext.h"
    #include "HTMLFrameOwnerElement.h"
    #include "HTMLIFrameElement.h"
    #include "HitTestResult.h"
    #include "Page.h"
    #include "RenderGeometryMap.h"
    #include "RenderLayer.h"
    #include "RenderLayerBacking.h"
    #include "RenderNamedFlowThread.h"
    #include "RenderSelectionInfo.h"
    #include "RenderWidget.h"
    #include "RenderWidgetProtector.h"
    #include "StyleInheritedData.h"
    #include "TransformState.h"
    #include <wtf/StackStats.h>

    #if USE(ACCELERATED_COMPOSITING)
    #include "RenderLayerCompositor.h"
    #endif

    #if ENABLE(CSS_SHADERS) && USE(3D_GRAPHICS)
    #include "CustomFilterGlobalContext.h"
    #endif

    #include "qwebframe.h"
    #include "PrintContext.h"
    #include "QtPrintContext.h"
    #include "qwebelement.h"
    #include "qwebframe_p.h"
    #include "qwebpage.h"
    #include "qwebpage_p.h"
    #include "GraphicsContext.h"
    #include "RenderView.h"
    #include "ResourceRequest.h"
    #include "qwebscriptworld.h"
    #include "qwebscriptworld_p.h"
    #include "qwebsecurityorigin.h"
    #include "DOMWrapperWorld.h"
    #include "RenderView.h"
    #include <QMultiMap>
    #include <qdebug.h>
    #include <qevent.h>
    #include <qfileinfo.h>
    #include <qpainter.h>
    #if HAVE(QTPRINTSUPPORT)
    #include <qprinter.h>
    #endif
    #include <qnetworkrequest.h>
    #include <qregion.h>
    #include "RenderObject.h"@

    Awaiting for your help.
    George


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.