Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-89411

qttools fails to link. windows/static

    XMLWordPrintable

Details

    Description

       

       

      Link error with warnings:

      [554/565] cmd.exe /C "cd . && G:\vcpkg_common\downloads\tools\cmake-3.18.4-windows\cmake-3.18.4-win32-x86\bin\cmake.exe -E vs_link_exe --intdir=src\designer\src\designer\CMakeFiles\designer.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests -- C:\PROGRA~2\MICROS~4\2019\COMMUN~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x64\link.exe @CMakeFiles\designer.rsp /out:bin\designer.exe /implib:src\designer\src\designer\designer.lib /pdb:bin\designer.pdb /version:0.0 /machine:x64 /nologo /debug /subsystem:windows -DYNAMICBASE -NXCOMPAT && cd ."
      FAILED: bin/designer.exe 
      cmd.exe /C "cd . && G:\vcpkg_common\downloads\tools\cmake-3.18.4-windows\cmake-3.18.4-win32-x86\bin\cmake.exe -E vs_link_exe --intdir=src\designer\src\designer\CMakeFiles\designer.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests -- C:\PROGRA~2\MICROS~4\2019\COMMUN~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x64\link.exe @CMakeFiles\designer.rsp /out:bin\designer.exe /implib:src\designer\src\designer\designer.lib /pdb:bin\designer.pdb /version:0.0 /machine:x64 /nologo /debug /subsystem:windows -DYNAMICBASE -NXCOMPAT && cd ."
      LINK: command "C:\PROGRA~2\MICROS~4\2019\COMMUN~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x64\link.exe @CMakeFiles\designer.rsp /out:bin\designer.exe /implib:src\designer\src\designer\designer.lib /pdb:bin\designer.pdb /version:0.0 /machine:x64 /nologo /debug /subsystem:windows -DYNAMICBASE -NXCOMPAT /MANIFEST /MANIFESTFILE:bin\designer.exe.manifest" failed (exit code 1120) with the following output:
       Creating library src\designer\src\designer\designer.lib and object src\designer\src\designer\designer.exp
      ....
      LINK : warning LNK4217: symbol '?setFormTemplatePaths@QDesignerSharedSettings@qdesigner_internal@@QEAAXAEBV?$QList@VQString@@@@@Z (public: void __cdecl qdesigner_internal::QDesignerSharedSettings::setFormTemplatePaths(class QList<class QString> const &))' defined in 'Qt6Designerd.lib(shared_settings.cpp.obj)' is imported by 'saveformastemplate.cpp.obj' in function '"private: virtual void __cdecl SaveFormAsTemplate::accept(void)" (?accept@SaveFormAsTemplate@@EEAAXXZ)'
      qdesigner.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl QDesignerComponents::initializeResources(void)" (__imp_?initializeResources@QDesignerComponents@@SAXXZ) referenced in function "public: __cdecl QDesigner::QDesigner(int &,char * *)" (??0QDesigner@@QEAA@AEAHPEAPEAD@Z)
      qdesigner_toolwindow.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QDesignerWidgetBoxInterface * __cdecl QDesignerComponents::createWidgetBox(class QDesignerFormEditorInterface *,class QWidget *)" (__imp_?createWidgetBox@QDesignerComponents@@SAPEAVQDesignerWidgetBoxInterface@@PEAVQDesignerFormEditorInterface@@PEAVQWidget@@@Z) referenced in function "class QWidget * __cdecl createWidgetBox(class QDesignerFormEditorInterface *,class QWidget *)" (?createWidgetBox@@YAPEAVQWidget@@PEAVQDesignerFormEditorInterface@@PEAV1@@Z)
      qdesigner_toolwindow.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QDesignerPropertyEditorInterface * __cdecl QDesignerComponents::createPropertyEditor(class QDesignerFormEditorInterface *,class QWidget *)" (__imp_?createPropertyEditor@QDesignerComponents@@SAPEAVQDesignerPropertyEditorInterface@@PEAVQDesignerFormEditorInterface@@PEAVQWidget@@@Z) referenced in function "class QWidget * __cdecl createPropertyEditor(class QDesignerFormEditorInterface *,class QWidget *)" (?createPropertyEditor@@YAPEAVQWidget@@PEAVQDesignerFormEditorInterface@@PEAV1@@Z)
      qdesigner_toolwindow.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QDesignerObjectInspectorInterface * __cdecl QDesignerComponents::createObjectInspector(class QDesignerFormEditorInterface *,class QWidget *)" (__imp_?createObjectInspector@QDesignerComponents@@SAPEAVQDesignerObjectInspectorInterface@@PEAVQDesignerFormEditorInterface@@PEAVQWidget@@@Z) referenced in function "class QWidget * __cdecl createObjectInspector(class QDesignerFormEditorInterface *,class QWidget *)" (?createObjectInspector@@YAPEAVQWidget@@PEAVQDesignerFormEditorInterface@@PEAV1@@Z)
      qdesigner_toolwindow.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QDesignerActionEditorInterface * __cdecl QDesignerComponents::createActionEditor(class QDesignerFormEditorInterface *,class QWidget *)" (__imp_?createActionEditor@QDesignerComponents@@SAPEAVQDesignerActionEditorInterface@@PEAVQDesignerFormEditorInterface@@PEAVQWidget@@@Z) referenced in function "class QWidget * __cdecl createActionEditor(class QDesignerFormEditorInterface *,class QWidget *)" (?createActionEditor@@YAPEAVQWidget@@PEAVQDesignerFormEditorInterface@@PEAV1@@Z)
      qdesigner_toolwindow.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QWidget * __cdecl QDesignerComponents::createResourceEditor(class QDesignerFormEditorInterface *,class QWidget *)" (__imp_?createResourceEditor@QDesignerComponents@@SAPEAVQWidget@@PEAVQDesignerFormEditorInterface@@PEAV2@@Z) referenced in function "public: __cdecl ResourceEditorToolWindow::ResourceEditorToolWindow(class QDesignerWorkbench *)" (??0ResourceEditorToolWindow@@QEAA@PEAVQDesignerWorkbench@@@Z)
      qdesigner_toolwindow.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QWidget * __cdecl QDesignerComponents::createSignalSlotEditor(class QDesignerFormEditorInterface *,class QWidget *)" (__imp_?createSignalSlotEditor@QDesignerComponents@@SAPEAVQWidget@@PEAVQDesignerFormEditorInterface@@PEAV2@@Z) referenced in function "public: __cdecl SignalSlotEditorToolWindow::SignalSlotEditorToolWindow(class QDesignerWorkbench *)" (??0SignalSlotEditorToolWindow@@QEAA@PEAVQDesignerWorkbench@@@Z)
      qdesigner_workbench.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl QDesignerComponents::initializePlugins(class QDesignerFormEditorInterface *)" (__imp_?initializePlugins@QDesignerComponents@@SAXPEAVQDesignerFormEditorInterface@@@Z) referenced in function "public: __cdecl QDesignerWorkbench::QDesignerWorkbench(void)" (??0QDesignerWorkbench@@QEAA@XZ)
      qdesigner_workbench.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QDesignerFormEditorInterface * __cdecl QDesignerComponents::createFormEditor(class QObject *)" (__imp_?createFormEditor@QDesignerComponents@@SAPEAVQDesignerFormEditorInterface@@PEAVQObject@@@Z) referenced in function "public: __cdecl QDesignerWorkbench::QDesignerWorkbench(void)" (??0QDesignerWorkbench@@QEAA@XZ)
      qdesigner_workbench.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QObject * __cdecl QDesignerComponents::createTaskMenu(class QDesignerFormEditorInterface *,class QObject *)" (__imp_?createTaskMenu@QDesignerComponents@@SAPEAVQObject@@PEAVQDesignerFormEditorInterface@@PEAV2@@Z) referenced in function "public: __cdecl QDesignerWorkbench::QDesignerWorkbench(void)" (??0QDesignerWorkbench@@QEAA@XZ)
      bin\designer.exe : fatal error LNK1120: 10 unresolved externals 
      

       

      Probably due to

      qt_internal_extend_target(designer CONDITION QT_CONFIG___contains___static
       DEFINES
       QT_DESIGNER_STATIC
      )

      QT_CONFIG__contains__static is not being set I also did not find any hint where this should be set in qtbase. As such I replaced it with NOT BUILD_SHARED_LIBS.

       

      this reduce the unresolved symbols from 10 to 2 (still a lot of LNK warnings):

      Qt6DesignerComponentsd.lib(signalsloteditor_plugin.cpp.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl QDesignerFormEditorPluginInterface::QDesignerFormEditorPluginInterface(void)" (__imp_??0QDesignerFormEditorPluginInterface@@QEAA@XZ) referenced in function "public: __cdecl qdesigner_internal::SignalSlotEditorPlugin::SignalSlotEditorPlugin(void)" (??0SignalSlotEditorPlugin@qdesigner_internal@@QEAA@XZ)
      Qt6DesignerComponentsd.lib(tabordereditor_plugin.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl QDesignerFormEditorPluginInterface::QDesignerFormEditorPluginInterface(void)" (__imp_??0QDesignerFormEditorPluginInterface@@QEAA@XZ)
      Qt6DesignerComponentsd.lib(buddyeditor_plugin.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl QDesignerFormEditorPluginInterface::QDesignerFormEditorPluginInterface(void)" (__imp_??0QDesignerFormEditorPluginInterface@@QEAA@XZ)
      Qt6DesignerComponentsd.lib(signalsloteditor_plugin.cpp.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl QDesignerFormEditorPluginInterface::~QDesignerFormEditorPluginInterface(void)" (__imp_??1QDesignerFormEditorPluginInterface@@UEAA@XZ) referenced in function "public: virtual __cdecl qdesigner_internal::SignalSlotEditorPlugin::~SignalSlotEditorPlugin(void)" (??1SignalSlotEditorPlugin@qdesigner_internal@@UEAA@XZ)
      Qt6DesignerComponentsd.lib(tabordereditor_plugin.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl QDesignerFormEditorPluginInterface::~QDesignerFormEditorPluginInterface(void)" (__imp_??1QDesignerFormEditorPluginInterface@@UEAA@XZ)
      Qt6DesignerComponentsd.lib(buddyeditor_plugin.cpp.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl QDesignerFormEditorPluginInterface::~QDesignerFormEditorPluginInterface(void)" (__imp_??1QDesignerFormEditorPluginInterface@@UEAA@XZ)
      bin\designer.exe : fatal error LNK1120: 2 unresolved externals

      due to:

      qt_internal_extend_target(DesignerComponents CONDITION static
       DEFINES
       QT_DESIGNER_STATIC
      )

      i also changed that to use NOT BUILD_SHARED_LIBS and it builds. 

       

       

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            neumann-a Alexander Neumann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes