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

Qt 6.0.0 uncompilable with "-static" flag

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • None
    • 6.0.0
    • Build System: CMake
    • None
    • Windows

    Description

      When I configure Qt build with "-static" it fails late with some unresolved externals errors. Also, I believe "-static-runtime" is not handled correctly as with that flag build fails even earlier:

      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 "public: __cdecl WidgetBoxToolWindow::WidgetBoxToolWindow(class QDesignerWorkbench *)" (??0WidgetBoxToolWindow@@QEAA@PEAVQDesignerWorkbench@@@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 "public: __cdecl PropertyEditorToolWindow::PropertyEditorToolWindow(class QDesignerWorkbench *)" (??0PropertyEditorToolWindow@@QEAA@PEAVQDesignerWorkbench@@@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 "public: __cdecl ObjectInspectorToolWindow::ObjectInspectorToolWindow(class QDesignerWorkbench *)" (??0ObjectInspectorToolWindow@@QEAA@PEAVQDesignerWorkbench@@@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 "public: __cdecl ActionEditorToolWindow::ActionEditorToolWindow(class QDesignerWorkbench *)" (??0ActionEditorToolWindow@@QEAA@PEAVQDesignerWorkbench@@@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)
      qtbase\bin\Release\designer.exe : fatal error LNK1120: 10 unresolved externals
      [7026/9391] Building CXX object qttools\src\pixeltool\CMak...Release\__\__\__\qtquicktimeline\qt_Gui_QICOPlugin.cpp.obj
      ninja: build stopped: subcommand failed.
      

      Configure line:

      "$qt_src_base_folder\configure.bat" -cmake -debug-and-release -opensource -confirm-license -opengl desktop -no-dbus -no-icu -no-fontconfig -nomake examples -nomake tests -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtlocation -skip qtnetworkauth -skip qtpurchasing -skip qtquickcontrols -skip qtquickcontrols2 -skip qtremoteobjects -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtvirtualkeyboard -skip qtwebview -skip qtscript -mp -optimize-size -static -prefix $prefix_folder -openssl-linked -DOPENSSL_ROOT_DIR="$openssl_base_folder" -- -DCMAKE_INCLUDE_PATH="$mysql_include_folder" -DCMAKE_LIBRARY_PATH="$mysql_lib_folder"
      

      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
            skunkos Martin Rotter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes