Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Linking errors
Qt 6.11 is out! See what's new in the release blog

Qt Linking errors

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 1.5k 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.
  • M Offline
    M Offline
    Manikanta N
    wrote on last edited by
    #1

    While building a sample application using Qt 4.4.3 along with Microsoft VisualC++ 6 , we are facing the following errors during the linking phase.

    Compiling...
    main.cpp
    Linking...
    main.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall QApplication::~QApplication(void)" (??1QApplication@@UAE@XZ)
    main.obj : error LNK2001: unresolved external symbol "public: static int __cdecl QApplication::exec(void)" (?exec@QApplication@@SAHXZ)
    main.obj : error LNK2001: unresolved external symbol "public: thiscall QApplication::QApplication(int &,char * *,int)" (??0QApplication@@QAE@AAHPAPADH@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual int thiscall QWidget::metric(enum QPaintDevice::PaintDeviceMetric)const " (?metric@QWidget@@MBEHW4PaintDeviceMetric@QPaintDevice@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: virtual void thiscall QWidget::releaseDC(struct HDC *)const " (?releaseDC@QWidget@@UBEXPAUHDC
    @@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: virtual struct HDC
    * thiscall QWidget::getDC(void)const " (?getDC@QWidget@@UBEPAUHDC@@XZ)
    notepad.obj : error LNK2001: unresolved external symbol "public: virtual class QPaintEngine * __thiscall QWidget::paintEngine(void)const " (?paintEngine@QWidget@@UBEPAVQPaintEngine@@XZ)
    notepad.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall QWidget::devType(void)const " (?devType@QWidget@@UBEHXZ)
    notepad.obj : error LNK2001: unresolved external symbol "public: virtual class QMenu * __thiscall QMainWindow::createPopupMenu(void)" (?createPopupMenu@QMainWindow@@UAEPAVQMenu@@XZ)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::languageChange(void)" (?languageChange@QWidget@@MAEXXZ)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::windowActivationChange(bool)" (?windowActivationChange@QWidget@@MAEX_N@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::fontChange(class QFont const &)" (?fontChange@QWidget@@MAEXABVQFont@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::paletteChange(class QPalette const &)" (?paletteChange@QWidget@@MAEXABVQPalette@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::enabledChange(bool)" (?enabledChange@QWidget@@MAEX_N@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::styleChange(class QStyle &)" (?styleChange@QWidget@@MAEXAAVQStyle@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual bool __thiscall QWidget::focusNextPrevChild(bool)" (?focusNextPrevChild@QWidget@@MAE_N_N@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: virtual class QVariant __thiscall QWidget::inputMethodQuery(enum Qt::InputMethodQuery)const " (?inputMethodQuery@QWidget@@UBE?AVQVariant@@W4InputMethodQuery@Qt@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::inputMethodEvent(class QInputMethodEvent *)" (?inputMethodEvent@QWidget@@MAEXPAVQInputMethodEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::changeEvent(class QEvent *)" (?changeEvent@QWidget@@MAEXPAVQEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual bool __thiscall QWidget::winEvent(struct tagMSG *,long *)" (?winEvent@QWidget@@MAE_NPAUtagMSG@@PAJ@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::hideEvent(class QHideEvent *)" (?hideEvent@QWidget@@MAEXPAVQHideEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::showEvent(class QShowEvent *)" (?showEvent@QWidget@@MAEXPAVQShowEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::dropEvent(class QDropEvent *)" (?dropEvent@QWidget@@MAEXPAVQDropEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::dragLeaveEvent(class QDragLeaveEvent *)" (?dragLeaveEvent@QWidget@@MAEXPAVQDragLeaveEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::dragMoveEvent(class QDragMoveEvent *)" (?dragMoveEvent@QWidget@@MAEXPAVQDragMoveEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::dragEnterEvent(class QDragEnterEvent *)" (?dragEnterEvent@QWidget@@MAEXPAVQDragEnterEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::actionEvent(class QActionEvent *)" (?actionEvent@QWidget@@MAEXPAVQActionEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::tabletEvent(class QTabletEvent *)" (?tabletEvent@QWidget@@MAEXPAVQTabletEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QMainWindow::contextMenuEvent(class QContextMenuEvent *)" (?contextMenuEvent@QMainWindow@@MAEXPAVQContextMenuEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::closeEvent(class QCloseEvent *)" (?closeEvent@QWidget@@MAEXPAVQCloseEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::resizeEvent(class QResizeEvent *)" (?resizeEvent@QWidget@@MAEXPAVQResizeEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::moveEvent(class QMoveEvent *)" (?moveEvent@QWidget@@MAEXPAVQMoveEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::paintEvent(class QPaintEvent *)" (?paintEvent@QWidget@@MAEXPAVQPaintEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::leaveEvent(class QEvent *)" (?leaveEvent@QWidget@@MAEXPAVQEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::enterEvent(class QEvent *)" (?enterEvent@QWidget@@MAEXPAVQEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::focusOutEvent(class QFocusEvent *)" (?focusOutEvent@QWidget@@MAEXPAVQFocusEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::focusInEvent(class QFocusEvent *)" (?focusInEvent@QWidget@@MAEXPAVQFocusEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::keyReleaseEvent(class QKeyEvent *)" (?keyReleaseEvent@QWidget@@MAEXPAVQKeyEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::keyPressEvent(class QKeyEvent *)" (?keyPressEvent@QWidget@@MAEXPAVQKeyEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::wheelEvent(class QWheelEvent *)" (?wheelEvent@QWidget@@MAEXPAVQWheelEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::mouseMoveEvent(class QMouseEvent *)" (?mouseMoveEvent@QWidget@@MAEXPAVQMouseEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::mouseDoubleClickEvent(class QMouseEvent *)" (?mouseDoubleClickEvent@QWidget@@MAEXPAVQMouseEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::mouseReleaseEvent(class QMouseEvent *)" (?mouseReleaseEvent@QWidget@@MAEXPAVQMouseEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWidget::mousePressEvent(class QMouseEvent *)" (?mousePressEvent@QWidget@@MAEXPAVQMouseEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall QWidget::heightForWidth(int)const " (?heightForWidth@QWidget@@UBEHH@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: virtual class QSize __thiscall QWidget::minimumSizeHint(void)const " (?minimumSizeHint@QWidget@@UBE?AVQSize@@XZ)
    notepad.obj : error LNK2001: unresolved external symbol "public: virtual class QSize __thiscall QWidget::sizeHint(void)const " (?sizeHint@QWidget@@UBE?AVQSize@@XZ)
    notepad.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QWidget::setVisible(bool)" (?setVisible@QWidget@@UAEX_N@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QObject::disconnectNotify(char const *)" (?disconnectNotify@QObject@@MAEXPBD@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QObject::connectNotify(char const *)" (?connectNotify@QObject@@MAEXPBD@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QObject::customEvent(class QEvent *)" (?customEvent@QObject@@MAEXPAVQEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QObject::childEvent(class QChildEvent *)" (?childEvent@QObject@@MAEXPAVQChildEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QObject::timerEvent(class QTimerEvent *)" (?timerEvent@QObject@@MAEXPAVQTimerEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall QObject::eventFilter(class QObject *,class QEvent *)" (?eventFilter@QObject@@UAE_NPAV1@PAVQEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "protected: virtual bool __thiscall QMainWindow::event(class QEvent *)" (?event@QMainWindow@@MAE_NPAVQEvent@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall notepad::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@notepad@@UAEHW4Call@QMetaObject@@HPAPAX@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall notepad::qt_metacast(char const *)" (?qt_metacast@notepad@@UAEPAXPBD@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall notepad::metaObject(void)const " (?metaObject@notepad@@UBEPBUQMetaObject@@XZ)
    notepad.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall QMainWindow::~QMainWindow(void)" (??1QMainWindow@@UAE@XZ)
    notepad.obj : error LNK2001: unresolved external symbol "public: void __thiscall QMainWindow::setCentralWidget(class QWidget *)" (?setCentralWidget@QMainWindow@@QAEXPAVQWidget@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: void __thiscall QWidget::setWindowTitle(class QString const &)" (?setWindowTitle@QWidget@@QAEXABVQString@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: void __thiscall QWidget::addAction(class QAction *)" (?addAction@QWidget@@QAEXPAVQAction@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: class QMenu * __thiscall QMenuBar::addMenu(class QString const &)" (?addMenu@QMenuBar@@QAEPAVQMenu@@ABVQString@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: class QMenuBar * __thiscall QMainWindow::menuBar(void)const " (?menuBar@QMainWindow@@QBEPAVQMenuBar@@XZ)
    notepad.obj : error LNK2001: unresolved external symbol "public: static bool __cdecl QObject::connect(class QObject const *,char const *,class QObject const *,char const *,enum Qt::ConnectionType)" (?connect@QObject@@SA_NPBV1@PBD01W4ConnectionType@Q
    t@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "private: static void __cdecl QString::free(struct QString::Data *)" (?free@QString@@CAXPAUData@1@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: __thiscall QAction::QAction(class QString const &,class QObject *)" (??0QAction@@QAE@ABVQString@@PAVQObject@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: __thiscall QPushButton::QPushButton(class QWidget *)" (??0QPushButton@@QAE@PAVQWidget@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: __thiscall QTextEdit::QTextEdit(class QWidget *)" (??0QTextEdit@@QAE@PAVQWidget@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: __thiscall QMainWindow::QMainWindow(class QWidget *,class QFlags<enum Qt::WindowType>)" (??0QMainWindow@@QAE@PAVQWidget@@V?$QFlags@W4WindowType@Qt@@@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall QMessageBox::~QMessageBox(void)" (??1QMessageBox@@UAE@XZ)
    notepad.obj : error LNK2001: unresolved external symbol "public: int __thiscall QDialog::exec(void)" (?exec@QDialog@@QAEHXZ)
    notepad.obj : error LNK2001: unresolved external symbol "public: void __thiscall QMessageBox::setDefaultButton(enum QMessageBox::StandardButton)" (?setDefaultButton@QMessageBox@@QAEXW4StandardButton@1@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: void __thiscall QMessageBox::setStandardButtons(class QFlags<enum QMessageBox::StandardButton>)" (?setStandardButtons@QMessageBox@@QAEXV?$QFlags@W4StandardButton@QMessageBox@@@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: void __thiscall QMessageBox::setText(class QString const &)" (?setText@QMessageBox@@QAEXABVQString@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: __thiscall QMessageBox::QMessageBox(class QWidget *)" (??0QMessageBox@@QAE@PAVQWidget@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall QTextStream::~QTextStream(void)" (??1QTextStream@@UAE@XZ)
    notepad.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall QFile::close(void)" (?close@QFile@@UAEXXZ)
    notepad.obj : error LNK2001: unresolved external symbol "public: void __thiscall QTextEdit::setText(class QString const &)" (?setText@QTextEdit@@QAEXABVQString@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: class QString __thiscall QTextStream::readAll(void)" (?readAll@QTextStream@@QAE?AVQString@@XZ)
    notepad.obj : error LNK2001: unresolved external symbol "public: __thiscall QTextStream::QTextStream(class QIODevice *)" (??0QTextStream@@QAE@PAVQIODevice@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall QFile::~QFile(void)" (??1QFile@@UAE@XZ)
    notepad.obj : error LNK2001: unresolved external symbol "public: static enum QMessageBox::StandardButton __cdecl QMessageBox::critical(class QWidget *,class QString const &,class QString const &,class QFlags<enum QMessageBox::StandardButton>,enum QM
    essageBox::StandardButton)" (?critical@QMessageBox@@SA?AW4StandardButton@1@PAVQWidget@@ABVQString@@1V?$QFlags@W4StandardButton@QMessageBox@@@@W421@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall QFile::open(class QFlags<enum QIODevice::OpenModeFlag>)" (?open@QFile@@UAE_NV?$QFlags@W4OpenModeFlag@QIODevice@@@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: __thiscall QFile::QFile(class QString const &)" (??0QFile@@QAE@ABVQString@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: static class QString __cdecl QFileDialog::getOpenFileName(class QWidget *,class QString const &,class QString const &,class QString const &,class QString *,class QFlags<enum QFileDialo
    g::Option>)" (?getOpenFileName@QFileDialog@@SA?AVQString@@PAVQWidget@@ABV2@11PAV2@V?$QFlags@W4Option@QFileDialog@@@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "private: static struct QString::Data * __cdecl QString::fromAscii_helper(char const *,int)" (?fromAscii_helper@QString@@CAPAUData@1@PBDH@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: void __thiscall QTextStream::flush(void)" (?flush@QTextStream@@QAEXXZ)
    notepad.obj : error LNK2001: unresolved external symbol "public: class QTextStream & __thiscall QTextStream::operator<<(class QString const &)" (??6QTextStream@@QAEAAV0@ABVQString@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: static class QString __cdecl QFileDialog::getSaveFileName(class QWidget *,class QString const &,class QString const &,class QString const &,class QString *,class QFlags<enum QFileDialo
    g::Option>)" (?getSaveFileName@QFileDialog@@SA?AVQString@@PAVQWidget@@ABV2@11PAV2@V?$QFlags@W4Option@QFileDialog@@@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: static void __cdecl QCoreApplication::quit(void)" (?quit@QCoreApplication@@SAXXZ)
    notepad.obj : error LNK2001: unresolved external symbol "public: void __thiscall QMessageBox::setWindowTitle(class QString const &)" (?setWindowTitle@QMessageBox@@QAEXABVQString@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: bool __thiscall QString::operator==(class QLatin1String const &)const " (??8QString@@QBE_NABVQLatin1String@@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: bool __thiscall QString::operator==(class QString const &)const " (??8QString@@QBE_NABV0@@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: static class QString __cdecl QString::fromAscii(char const *,int)" (?fromAscii@QString@@SA?AV1@PBDH@Z)
    notepad.obj : error LNK2001: unresolved external symbol "private: static class QTextCodec * QString::codecForCStrings" (?codecForCStrings@QString@@0PAVQTextCodec@@A)
    notepad.obj : error LNK2001: unresolved external symbol "public: class QString __thiscall QTextDocument::toPlainText(void)const " (?toPlainText@QTextDocument@@QBE?AVQString@@XZ)
    notepad.obj : error LNK2001: unresolved external symbol "public: class QTextDocument * __thiscall QTextEdit::document(void)const " (?document@QTextEdit@@QBEPAVQTextDocument@@XZ)
    notepad.obj : error LNK2001: unresolved external symbol "public: class QString __thiscall QMetaObject::tr(char const *,char const *)const " (?tr@QMetaObject@@QBE?AVQString@@PBD0@Z)
    notepad.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const notepad::staticMetaObject" (?staticMetaObject@notepad@@2UQMetaObject@@B)
    Release/main.exe : fatal error LNK1120: 100 unresolved externals
    Error executing link.exe.

    1 Reply Last reply
    0
    • artwawA Offline
      artwawA Offline
      artwaw
      wrote on last edited by artwaw
      #2

      Hi
      I'd guess that you have version mismatch somewhere between header files/toolchain/libraries. But it's only a guess, Qt 4.4 is... archeology this days.
      I hope someone here would be able to help you more.

      For more information please re-read.

      Kind Regards,
      Artur

      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