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

Failed to build static Qt 5.0 on Windows 7 x86 32 bit MSVC2010

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.0.0 Beta 2
    • Fix Version/s: 5.0.0 RC 1
    • Component/s: Build System
    • Labels:
      None
    • Environment:
      Windows 7 x86 32 bit, Microsoft Windows SDK 7.1, Active Python 2.7, Active Perl 5.16.1
    • Commits:
      qttools: fb3f94b22bbe3cb52c5d936d04b2e721e98d2e97 qtbase/qmake 2d795717fc2d58862a6f4a9b9c7d97bb973c5eb8 active X : 7d07dea521f849aeaa58fb8e69066376755b74b8

      Description

      I failed to build static Qt 5.0.

      All steps are set according to http://qt-project.org/wiki/Building_Qt_5_from_Git .
      Differences from guide are only that:
      1. No ICU and WebKit
      1. I used -debug-and-release or -release flag
      2. I used -static flag
      3. I used "desktop" OpenGL flag (no ANGLE)
      4. Also i had to remove ActiveQt module, because it fails while building statically with "duplicate symbols" error.

      I tried both "Qt5.0 beta2 Sources" from official download section and fresh sources from git://gitorious.org/qt/qt5.git on 21.11.12 date.

      It seems that build process finished 70-80% and stopped if configured static.
      Important note: Build was finished successfully with the same building process but without -static flag for me (surely i start each build process from crap in fresh prepared Qt5.0 sources folder, cleaning everything after previous try).

      Bat-file used for configuring:

      setlocal
      PATH=c:\Program Files\Microsoft Visual Studio 10.0\VC\bin;%PATH%
      call "c:\Program Files\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat"
      set QTDIR=
      set PATH=c:\Python27\;c:\Perl\bin\;%CD%\qtbase\bin;%CD%\qtrepotools\bin;%PATH%
      set CL=/MP
      configure -debug-and-release -static -opensource -confirm-license -nomake examples -nomake tests -no-icu -opengl desktop -platform win32-msvc2010
      endlocal

      Bat-file used for building:

      setlocal
      PATH=c:\Program Files\Microsoft Visual Studio 10.0\VC\bin;%PATH%
      call "c:\Program Files\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat"
      set QTDIR=%CD%\qtbase
      set PATH=c:\Python27\;c:\Perl\bin\;%CD%\qtbase\bin;%CD%\qtrepotools\bin;%PATH%
      set CL=/MP
      nmake
      endlocal

      And here is log with build errors:

      qdesigner_toolwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QDesignerPropertyEditorInterface * __cdecl QDesignerComponents::createPropertyEditor(class DesignerFormEditorInterface *,class QWidget *)" (__imp_?createPropertyEditor@QDesignerComponents@@SAPAVQDesignerPropertyEditorInterface@@PAVQDesignerFormEditorInterface@@PAVQWidget@@@Z) referenced in function "class QWidget * __cdecl createPropertyEditor(class QDesignerFormEditorInterface *,class QWidget *)" (?createPropertyEditor@@YAPAVQWidget@@PAVQDesignerFormEditorInterface@@PAV1@@Z) qdesigner_toolwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QDesignerActionEditorInterface * __cdecl QDesignerComponents::createActionEditor(class QDesignerFormEditorInterface *,class QWidget *)" (__imp_?createActionEditor@QDesignerComponents@@SAPAVQDesignerActionEditorInterface@@PAVQDesignerFormEditorInterface@@PAVQWidget@@@Z) referenced in function "class QWidget * __cdecl createActionEditor(class QDesignerFormEditorInterface *,class QWidget *)" (?createActionEditor@@YAPAVQWidget@@PAVQDesignerFormEditorInterface@@PAV1@@Z)
      qdesigner_toolwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QDesignerObjectInspectorInterface * __cdecl QDesignerComponents::createObjectInspector(class QDesignerFormEditorInterface *,class QWidget *)" (__imp_?createObjectInspector@QDesignerComponents@@SAPAVQDesignerObjectInspectorInterface@@PAVQDesignerFormEditorInterface@@PAVQWidget@@@Z) referenced in function "class QWidget * __cdecl createObjectInspector(class QDesignerFormEditorInterface *,class QWidget *)" (?createObjectInspector@@YAPAVQWidget@@PAVQDesignerFormEditorInterface@@PAV1@@Z)
      qdesigner_toolwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QDesignerWidgetBoxInterface * __cdecl QDesignerComponents::createWidgetBox(class QDesignerFormEditorInterface *,class QWidget *)" (__imp_?createWidgetBox@QDesignerComponents@@SAPAVQDesignerWidgetBoxInterface@@PAVQDesignerFormEditorInterface@@PAVQWidget@@@Z) referenced in function "class QWidget * __cdecl createWidgetBox(class QDesignerFormEditorInterface *,class QWidget *)" (?createWidgetBox@@YAPAVQWidget@@PAVQDesignerFormE
      ditorInterface@@PAV1@@Z) qdesigner_toolwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QWidget * __cdecl QDesignerComponents::createResourceEditor(class QDesignerFormEditorInterface *,class QWidget *)" (__imp_?createResourceEditor@QDesignerComponents@@SAPAVQWidget@@PAVQDesignerFormEditorInterface@@PAV2@@Z) referenced in function "public: __thiscall ResourceEditorToolWindow::ResourceEditorToolWindow(class QDesignerWorkbench *)" (??0ResourceEditorToolWindow@@QAE@PAVQDesignerWorkbench@@@Z)
      qdesigner_toolwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QWidget * __cdecl QDesignerComponents::createSignalSlotEditor(class QDesignerFormEditorInterface *,class QWidget *)" (__imp_?createSignalSlotEditor@QDesignerComponents@@SAPAVQWidget@@PAVQDesignerFormEditorInterface@@PAV2@@Z) referenced in function "public: __thiscall SignalSlotEditorToolWindow::SignalSlotEditorToolWindow(class QDesignerWorkbench *)" (??0SignalSlotEditorToolWindow@@QAE@PAVQDesignerWorkbench@@@Z)
      qdesigner_workbench.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl QDesignerComponents::initializePlugins(class QDesignerFormEditorInterface *)" (__imp_?initializePlugins@QDesignerComponents@@SAXPAVQDesignerFormEditorInterface@@@Z) referenced in function "public: __thiscall QDesignerWorkbench::QDesignerWorkbench(void)" (??0QDesignerWorkbench@@QAE@XZ)
      qdesigner_workbench.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QObject * __cdecl QDesignerComponents::createTaskMenu(class QDesignerFormEditorInterface *,class QObject *)" (__imp_?createTaskMenu@QDesignerComponents@@SAPAVQObject@@PAVQDesignerFormEditorInterface@@PAV2@@Z) referenced in function "public: __thiscall QDesignerWorkbench::QDesignerWorkbench(void)" (??0QDesignerWorkbench@@QAE@XZ)
      qdesigner_workbench.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QDesignerFormEditorInterface * __cdecl QDesignerComponents::createFormEditor(class QObject *)" (__imp_?createFormEditor@QDesignerComponents@@SAPAVQDesignerFormEditorInterface@@PAVQObject@@@Z) referenced in function "public: __thiscall QDesignerWorkbench::QDesignerWorkbench(void)" (??0QDesigne
      rWorkbench@@QAE@XZ) qdesigner_actions.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static struct QMetaObject const qdesigner_internal::QDesignerFormWindowManager::staticMetaObject" (__imp_?staticMetaObject@QDesignerFormWindowManager@qdesigner_internal@@2UQMetaObject@@B) referenced in function "class qdesigner_internal::QDesignerFormWindowManager * __cdecl qobject_cast(class QObject *)" (??$qobject_cast@PAVQDesignerFormWindowManager@qdesigner_internal@@@@YAPAVQDesignerFormWindowManager@qdesigner_internal@@PAVQObject@@@Z) qdesigner_actions.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static bool __cdecl qdesigner_internal::CodeDialog::showCodeDialog(class QDesignerFormWindowInterface const *,class QWidget *,class QString *)" (__imp_?showCodeDialog@CodeDi
      alog@qdesigner_internal@@SA_NPBVQDesignerFormWindowInterface@@PAVQWidget@@PAVQString@@@Z) referenced in function "private: void __thiscall QDesignerActions::viewCode(void)" (?viewCode@QDesignerActions@@AAEXXZ) newform.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QImage __cdecl qdesigner_internal::NewFormWidget::grabForm(class QDesignerFormEditorInterface *,class QIODevice &,class QString const &,class qdesigner_internal::DevicePr
      ofile const &)" (__imp_?grabForm@NewFormWidget@qdesigner_internal@@SA?AVQImage@@PAVQDesignerFormEditorInterface@@AAVQIODevice@@ABVQString@@ABVDeviceProfile@2@@Z) referenced in function "public: static class QImage __cdecl NewForm::grabForm(class QDesignerFormEditorInterface *,class QIODevice &,class QString const &,class qdesigner_internal::DeviceProfile const &)" (?grabForm@NewForm@@SA?AVQImage@@PAVQD
      esignerFormEditorInterface@@AAVQIODevice@@ABVQString@@ABVDeviceProfile@qdesigner_internal@@@Z)
      newform.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class QDesignerNewFormWidgetInterface * _
      _cdecl QDesignerNewFormWidgetInterface::createNewFormWidget(class QDesignerFormEditorInterface *,class QWidget *)" (__imp_?createNewFormWidget@QDesignerNewFormWidgetInterface@@SAPAV1@PAVQDesignerFormEditorInterface@@PAVQWidget@@@Z) referenced in function "public: __this
      call NewForm::NewForm(class QDesignerWorkbench *,class QWidget *,class QString const &)" (??0NewForm@@QAE@PAVQDesignerWorkbench@@PAVQWi
      dget@@ABVQString@@@Z) d:\SDK\Qt5.0\qtbase\bin\designer.exe : fatal error LNK1120: 14 unresolved externals
      NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\link.EXE"' : return code '0x460'
      Stop.
      NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\nmake.exe"' : return code '0x2'
      Stop.
      NMAKE : fatal error U1077: 'cd' : return code '0x2'
      Stop.
      NMAKE : fatal error U1077: 'cd' : return code '0x2'
      Stop.
      NMAKE : fatal error U1077: 'cd' : return code '0x2'
      Stop.
      NMAKE : fatal error U1077: 'cd' : return code '0x2'
      Stop.
      NMAKE : fatal error U1077: 'cd' : return code '0x2'
      Stop.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              kleint Friedemann Kleint
              Reporter:
              avassen Vasily Shchukin
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: