Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Difficulties with building QtCreator by MSVC (linkage error)
QtWS25 Last Chance

Difficulties with building QtCreator by MSVC (linkage error)

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
5 Posts 5 Posters 2.4k Views
  • 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.
  • D Offline
    D Offline
    drewpts
    wrote on 9 Sept 2018, 21:59 last edited by
    #1

    Hi!

    Following error really annoys me whole day:

    Creating library ..\..\..\..\..\..\lib\qtcreator\qbsqtprofilesetup1.lib and object ..\..\..\..\..\..\lib\qtcreator\qbsqtprofilesetup1.exp
    qmlcache_loader.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl QQmlPrivate::qmlregister(enum QQmlPrivate::RegistrationType,void *)" (__imp_?qmlregister@QQmlPrivate@@YAHW4RegistrationType@1@PEAX@Z) referenced in function "public: __cdecl `anonymous namespace'::Registry::Registry(void)" (??0Registry@?A0x242eca99@@QEAA@XZ)
    ..\..\..\..\..\..\lib\qtcreator\qbsqtprofilesetup1.dll : fatal error LNK1120: 1 unresolved externals
    

    So far I tried:
    MSVC 2015 64-bit compiler with Qt 5.11.1 for 4.7 and master branches
    MSVC 2017 64-bit compiler with Qt 5.11.1 for 4.7 and master branches

    I have compiled LLVM and Clang 6.0.1 with RTTI support (as far I understand that's needed for some clang plugins),
    set appropriate env. vars, next just opened in QtCreator 4.7 whole qt-creator project and ran.

    I don't have any errors or warnings in Kits section of QtCreator but mentioned linkage errors still are there.

    Could you please point me in right direction?

    Thanks,
    Andrey

    1 Reply Last reply
    0
    • N Offline
      N Offline
      Nicola Peroni
      wrote on 2 Oct 2018, 14:39 last edited by
      #2

      Up: same issue when enable QtQuickCompiler
      Qt 5.11.2 on Windows with MSVC 2017 64bit

      1 Reply Last reply
      0
      • A Offline
        A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on 2 Oct 2018, 14:50 last edited by
        #3

        Hi @drewpts and @Nicola-Peroni,

        this question may be better answered on the QtCreator mailing list as you reach more developers there. This forum is more user orientated.

        Qt has to stay free or it will die.

        1 Reply Last reply
        1
        • J Offline
          J Offline
          Justin Howard
          wrote on 8 Oct 2018, 07:43 last edited by
          #4

          I've hit exactly the same problem. It's a real pain in the neck. Debug seems to build in Qt Creator, but not the release one. If I can figure this out I'll reply on this thread.

          1 Reply Last reply
          0
          • P Offline
            P Offline
            PaulG
            wrote on 31 Oct 2018, 21:17 last edited by
            #5

            I ran into this as well, and worked around it by adding

            QT += qml
            

            to two of the .pro files that complained about this link error. Specifically, qtprofilesetup.pro and qtquickplugin.pro

            Interestingly it built fine in Release with QBS rather than QMake but in order to deploy my plugin against the latest downloadable version, I need it to be built the same way, which is using QMake (the QBS version changes some DLL names around)

            Hope this helps someone

            1 Reply Last reply
            7

            • Login

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