Results 1 to 3 of 3

Thread: Strange linker errors with QVector

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2010
    Posts
    7
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Strange linker errors with QVector

    I try to use Qt with VS2010. I got 2 projects, one is fine, the other gets these errors:
    (sorry - I am using a german system)

    I alredy tried to instanciate QVector<QPointF> but this does not solve the problem.

    FixturePolygon.cpp.obj : error LNK2019: Verweis auf nicht aufgel÷stes externes Symbol ""__declspec(dllimport) public: class QVector<class QPointF>::const_iterator __thiscall QVector<class QPointF>::end(void)const " (__imp_?end@?$QVector@VQPointF@@@@QBE?AVconst_iter ator@1@XZ)" in Funktion ""public: __thiscall QForeachContainer<class GPolygonF>::QForeachContainer<class GPolygonF>(class GPolygonF const &)" (??0?$QForeachContainer@VGPolygonF@@@@QAE@ABVGPoly gonF@@@Z)".
    main.cpp.obj : error LNK2001: Nicht aufgel÷stes externes Symbol ""__declspec(dllimport) public: class QVector<class QPointF>::const_iterator __thiscall QVector<class QPointF>::end(void)const " (__imp_?end@?$QVector@VQPointF@@@@QBE?AVconst_iter ator@1@XZ)".
    Polygon.cpp.obj : error LNK2001: Nicht aufgel÷stes externes Symbol ""__declspec(dllimport) public: class QVector<class QPointF>::const_iterator __thiscall QVector<class QPointF>::end(void)const " (__imp_?end@?$QVector@VQPointF@@@@QBE?AVconst_iter ator@1@XZ)".
    FixturePolygon.cpp.obj : error LNK2019: Verweis auf nicht aufgel÷stes externes Symbol ""__declspec(dllimport) public: class QVector<class QPointF>::const_iterator __thiscall QVector<class QPointF>::begin(void)const " (__imp_?begin@?$QVector@VQPointF@@@@QBE?AVconst_it erator@1@XZ)" in Funktion ""public: __thiscall QForeachContainer<class GPolygonF>::QForeachContainer<class GPolygonF>(class GPolygonF const &)" (??0?$QForeachContainer@VGPolygonF@@@@QAE@ABVGPoly gonF@@@Z)".
    main.cpp.obj : error LNK2001: Nicht aufgel÷stes externes Symbol ""__declspec(dllimport) public: class QVector<class QPointF>::const_iterator __thiscall QVector<class QPointF>::begin(void)const " (__imp_?begin@?$QVector@VQPointF@@@@QBE?AVconst_it erator@1@XZ)".
    Polygon.cpp.obj : error LNK2001: Nicht aufgel÷stes externes Symbol ""__declspec(dllimport) public: class QVector<class QPointF>::const_iterator __thiscall QVector<class QPointF>::begin(void)const " (__imp_?begin@?$QVector@VQPointF@@@@QBE?AVconst_it erator@1@XZ)".
    PhysicsEditor.exe : fatal error LNK1120: 2 nicht aufgel÷ste externe Verweise.
    LINK failed. with 2

  2. #2
    Join Date
    Oct 2010
    Posts
    7
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Strange linker errors with QVector

    I created a small test project - same problem.

    This seems to be the bug:
    Qt defines QVector<QPointF> as external in QVector if the compiler is VC.
    But somehow forgets to put the classes into the library.

  3. #3
    Join Date
    Nov 2010
    Posts
    315
    Thanked 53 Times in 51 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Strange linker errors with QVector

    Quote Originally Posted by bmueller63 View Post
    Qt defines QVector<QPointF> as external in QVector if the compiler is VC.
    But somehow forgets to put the classes into the library.
    Where? Point a location.
    Show code where you are using defining this QList.

Similar Threads

  1. Linker errors with Q_OBJECT
    By dustin034 in forum Qt Programming
    Replies: 2
    Last Post: 13th May 2010, 19:14
  2. linker errors from MinGW 4.4.0 for Qt 4.6.2
    By planetLars in forum Qt Tools
    Replies: 1
    Last Post: 15th April 2010, 20:30
  3. please help with linker errors
    By jimboqt in forum Qt Programming
    Replies: 1
    Last Post: 5th July 2007, 09:49
  4. Linker errors!!
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 25th April 2006, 08:14
  5. Linker Errors
    By MarkoSan in forum Qt Programming
    Replies: 5
    Last Post: 7th March 2006, 18:30

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.