Important: Please read the Qt Code of Conduct -

Undefined reference to `QQuickTextDocumentWithImageResources...

  • ABANDONED: Giving up smooth scrolling in qml for the mature functionality of C++ widgets.

    From qt5.2 source, I have taken customized versions of: qquicktextdocument qquicktextedit qquicktextnode and qquicktextnodenginge, their headers and source. I created a C++ library project with these files and compiled them into a shared library called

    I now have a different project that is to use that library I made. When I try to compile this project I get: error: undefined reference to QQuickTextDocumentWithImageResources::QQuickTextDocumentWithImageResources(QQuickItem*)' error: undefined reference toQQuickTextDocumentWithImageResources::staticMetaObject' error: undefined reference to QQuickTextUtil::createCursor(QQmlComponent*, QQuickItem*, QRectF const&, char const*)' error: undefined reference toQQuickTextUtil::alignedX(double, double, int)' error: undefined reference to QQuickTextDocumentWithImageResources::image(QTextImageFormat const&)' error: undefined reference toQQuickImplicitSizeItemPrivate::implicitHeightChanged()' error: undefined reference to QQuickTextUtil::alignedY(double, double, int)' error: undefined reference toQQuickTextDocumentWithImageResources::clearResources()' error: undefined reference to QQuickImplicitSizeItemPrivate::implicitWidthChanged()' error: undefined reference tovtable for QQuickImplicitSizeItemPrivate' error: undefined reference to QQuickTextDocumentWithImageResources::setBaseUrl(QUrl const&, bool)' error: undefined reference totypeinfo for QQuickImplicitSizeItemPrivate'
    :-1: error: collect2: error: ld returned 1 exit status@

    (I removed the full paths)

    I'm a long time web scripter, but I'm a C++/Qt newb, my guess is that I am not linking to the .so file which contains those functions.

    I'm pretty in over my head right now, but perhaps this is a simple fix and I just don't know it. If you know how to help compile this, it would be much appreciated.

    I realize I have left out a lot of details, I can provide them, I just didn't want to post a wall of text.

    Thank You.

Log in to reply