Qt World Summit: Submit your Presentation

13 LNK2001 errors with qt 5.11

  • I can't seem to locate the correct libs to link to in visual studio 2017. Here are snippets from some of the unresolved external symbol errors:
    QWidget::enabledChange(bool)" (imp?enabledChange@QWidget@@MAEX_N@Z)
    QWidget::styleChange(class QStyle &)" (imp?styleChange@QWidget@@MAEXAAVQStyle@@@Z)
    QWidget::winEvent(struct tagMSG *,long *)" (imp?winEvent@QWidget@@MAE_NPAUtagMSG@@PAJ@Z)
    QWidget::releaseDC(struct HDC
    *)const " (imp?releaseDC@QWidget@@UBEXPAUHDC
    QWidget::getDC(void)const " (imp?getDC@QWidget@@UBEPAUHDC_@@XZ)

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Did you check that you are linking against the widgets module ?

  • @mintykat Had to use the 4.7 qt libs - probably due to presence of some 4.7.3 code in some moc .h files

  • Lifetime Qt Champion

    The moc files are generated code, they should not be part of the source tree. Nuke them and rebuild with a more recent version of Qt. Qt 4 has already reached end of life for a couple of years now.

Log in to reply