Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-25468

Linker errors in qbs-based projects with Qt6

    XMLWordPrintable

    Details

      Description

      1. Use Creator's wizards to create a new project using build system Qbs.
        I tried Qt Quick Application and Qt Console Application projects.
      2. Try building this.
        You'll end up with linker errors:
        C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\cl.exe /nologo D:\Testprojekte\build-untitled9-Qt_6_0_0-Debug\Debug_Qt_6_0_0_126d11d9f7c662e3\untitled9.008df49e\3a52ce780950d4d9\main.cpp.obj /FeD:\Testprojekte\build-untitled9-Qt_6_0_0-Debug\Debug_Qt_6_0_0_126d11d9f7c662e3\untitled9.008df49e\untitled9.exe /link /nologo /DEBUG /PDB:untitled9.pdb /MACHINE:X64 /APPCONTAINER:NO /OSVERSION:5.02 "/SUBSYSTEM:CONSOLE,5.02" /MANIFEST:embed /LIBPATH:D:\Qt6rc\6.0.0\msvc2019_64\lib
        main.cpp.obj : error LNK2019: Verweis auf nicht aufgel”stes externes Symbol ""__declspec(dllimport) public: __cdecl QCoreApplication::QCoreApplication(int &,char * *,int)" (__imp_??0QCoreApplication@@QEAA@AEAHPEAPEADH@Z)" in Funktion "main".
        main.cpp.obj : error LNK2019: Verweis auf nicht aufgel”stes externes Symbol ""__declspec(dllimport) public: virtual __cdecl QCoreApplication::~QCoreApplication(void)" (__imp_??1QCoreApplication@@UEAA@XZ)" in Funktion "main".
        main.cpp.obj : error LNK2019: Verweis auf nicht aufgel”stes externes Symbol ""__declspec(dllimport) public: static int __cdecl QCoreApplication::exec(void)" (__imp_?exec@QCoreApplication@@SAHXZ)" in Funktion "main".
        D:\Testprojekte\build-untitled9-Qt_6_0_0-Debug\Debug_Qt_6_0_0_126d11d9f7c662e3\untitled9.008df49e\untitled9.exe : fatal error LNK1120: 3 nicht aufgel”ste Externe
        Process failed with exit code 2.
        

        Qbs seems to work fine with Qt5. Qt6 seems to work fine with qmake and CMake.

      If this cannot be fixed, should Creator just refuse creating Qbs projects for Qt6 kits?

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            kandeler Christian Kandeler
            Reporter:
            rlohning Robert Löhning
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes