Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Error LNK2019 with QGraphicsSvgItem
Forum Updated to NodeBB v4.3 + New Features

Error LNK2019 with QGraphicsSvgItem

Scheduled Pinned Locked Moved Installation and Deployment
4 Posts 3 Posters 3.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Grybb
    wrote on last edited by
    #1

    Hi,

    I want to use QGraphicsSvgItem but it doesn´t work. I´m sure that error is in it (without this one line of code everything works fine).

    @//#include <Qt/QGraphicsSvgItem.h>
    #include <QtSvg/QGraphicsSvgItem>

    QGraphicsSvgItem svgItem = new QGraphicsSvgItem(/":/mainwindow/image/Chess_rlt45.svg"*/);@

    Error:

    1> LINK : D:\Dokumenty\programovani\QT\test2\test2.exe not found or not built by the last incremental link; performing full link
    1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QGraphicsSvgItem::QGraphicsSvgItem(class QGraphicsItem *)" (_imp??0QGraphicsSvgItem@@QAE@PAVQGraphicsItem@@@Z) referenced in function _main
    1>main.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall QGraphicsSvgItem::metaObject(void)const " (?metaObject@QGraphicsSvgItem@@UBEPBUQMetaObject@@XZ)
    1>main.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall QGraphicsSvgItem::qt_metacast(char const *)" (?qt_metacast@QGraphicsSvgItem@@UAEPAXPBD@Z)
    1>main.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall QGraphicsSvgItem::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@QGraphicsSvgItem@@UAEHW4Call@QMetaObject@@HPAPAX@Z)
    1>main.obj : error LNK2001: unresolved external symbol "public: virtual class QRectF __thiscall QGraphicsSvgItem::boundingRect(void)const " (?boundingRect@QGraphicsSvgItem@@UBE?AVQRectF@@XZ)
    1>main.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QGraphicsSvgItem::paint(class QPainter *,class QStyleOptionGraphicsItem const *,class QWidget *)" (?paint@QGraphicsSvgItem@@UAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z)
    1>main.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall QGraphicsSvgItem::type(void)const " (?type@QGraphicsSvgItem@@UBEHXZ)
    1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QGraphicsSvgItem::~QGraphicsSvgItem(void)" (_imp??1QGraphicsSvgItem@@UAE@XZ) referenced in function "public: virtual void * __thiscall QGraphicsSvgItem::`scalar deleting destructor'(unsigned int)" (??_GQGraphicsSvgItem@@UAEPAXI@Z)
    1>D:\Dokumenty\programovani\QT\test2\test2.exe : fatal error LNK1120: 8 unresolved externals

    Everything else works fine. I don´t know what it´s wrong. I use MS Visual Studio 2010 with QT 4.8.0 on W7.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      Are you using the vsaddin?
      Check the "Qt Project Settings". There are all the modules listed for inclusion. Probably svg library is missing.

      Vote the answer(s) that helped you to solve your issue(s)

      Puppy BearP 1 Reply Last reply
      2
      • G Offline
        G Offline
        Grybb
        wrote on last edited by
        #3

        koahnig: You´re absolutely right! So easy and it took me a lot of time. Thank you very much!

        1 Reply Last reply
        0
        • K koahnig

          Are you using the vsaddin?
          Check the "Qt Project Settings". There are all the modules listed for inclusion. Probably svg library is missing.

          Puppy BearP Offline
          Puppy BearP Offline
          Puppy Bear
          wrote on last edited by
          #4

          @koahnig add this to vs addin-qt project settings - qt modules works fine for me,
          core;xml;network;gui;widgets;printsupport;concurrent;sql

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved