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

'already defined symbol' and 'unresolved external symbol' errors for 'Utils' library builds on Windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • None
    • Qt Creator 4.0.0-beta1
    • Building Qt Creator
    • None

    Description

      Hi, Everyone,

      Got errors while building Qt Creator using Mingw-w64:

      configure -prefix "%CD%\..\GCC64r\lib" -release -opensource -c++std c++11 -static -plugin-sql-sqlite -opengl desktop -openvg -I "%CD%\..\..\libMESA-11.2-dev\GCC64r\include" -platform win32-g++ -iconv -qt-zlib -qt-pcre -icu -I "%CD%\..\..\libICU-57.1\GCC64r\include" -L "%CD%\..\..\libICU-57.1\GCC64r\lib" -qt-libpng -qt-libjpeg -avx -openssl -I "%CD%\..\..\libOPENSSL-1.1.0-dev\GCC64r\include" -L "%CD%\..\..\libOPENSSL-1.1.0-dev\GCC64r\lib" -dbus-runtime -confirm-license -skip qtscript && mingw32-make
      
      [snip]
      
      cd <Qt Creator DIR> && qmake QTC_PREFIX="%ProgramData%\QtCreator\GCC64r\dll" && mingw32-make
      
      [snip]
      
      c:\libQT-5.7-dev\GCC64r\lib\lib\libQt5Core.a(qmimeprovider.o):qmimeprovider.cpp:(.data+0x0): multiple definition of `qmime_secondsBetweenChecks'
      ./release\mimeprovider.o:mimeprovider.cpp:(.data+0x0): first defined here
      c:\libQT-5.7-dev\GCC64r\lib\lib\libQt5Qml.a(qqmldebugconnector.o):qqmldebugconnector.cpp:(.text.startup+0xe): undefined reference to `qt_static_plugin_QQmlDebugServerFactory()'
      c:\libQT-5.7-dev\GCC64r\lib\lib\libQt5Qml.a(qqmldebugconnector.o):qqmldebugconnector.cpp:(.text.startup+0x1e): undefined reference to `qt_static_plugin_QQmlNativeDebugConnectorFactory()'
      c:\libQT-5.7-dev\GCC64r\lib\lib\libQt5Qml.a(qqmldebugconnector.o):qqmldebugconnector.cpp:(.text.startup+0x2e): undefined reference to `qt_static_plugin_QQmlInspectorServiceFactory()'
      c:\libQT-5.7-dev\GCC64r\lib\lib\libQt5Qml.a(qqmldebugconnector.o):qqmldebugconnector.cpp:(.text.startup+0x3e): undefined reference to `qt_static_plugin_QQmlProfilerServiceFactory()'
      c:\libQT-5.7-dev\GCC64r\lib\lib\libQt5Qml.a(qqmldebugconnector.o):qqmldebugconnector.cpp:(.text.startup+0x4e): undefined reference to `qt_static_plugin_QQmlDebuggerServiceFactory()'
      collect2.exe: error: ld returned 1 exit status
      Makefile.Release:566: recipe for target '..\..\..\lib\qtcreator\Utils.dll' failed
      mingw32-make[4]: *** [..\..\..\lib\qtcreator\Utils.dll] Error 1
      mingw32-make[4]: Leaving directory 'c:/qtcreator-4.0.0-dev/src/src/libs/utils'
      Makefile:34: recipe for target 'release' failed
      mingw32-make[3]: *** [release] Error 2
      mingw32-make[3]: Leaving directory 'c:/qtcreator-4.0.0-dev/src/src/libs/utils'
      Makefile:104: recipe for target 'sub-utils-make_first' failed
      mingw32-make[2]: *** [sub-utils-make_first] Error 2
      mingw32-make[2]: Leaving directory 'c:/qtcreator-4.0.0-dev/src/src/libs'
      Makefile:41: recipe for target 'sub-libs-make_first-ordered' failed
      mingw32-make[1]: *** [sub-libs-make_first-ordered] Error 2
      mingw32-make[1]: Leaving directory 'c:/qtcreator-4.0.0-dev/src/src'
      Makefile:39: recipe for target 'sub-src-make_first-ordered' failed
      mingw32-make: *** [sub-src-make_first-ordered] Error 2
      

      ICC and MSVC:

      configure -prefix "%CD%\..\MSVC64r\lib" -release -opensource -c++std c++11 -static -plugin-sql-sqlite -opengl desktop -openvg -I "%CD%\..\..\libMESA-11.2-dev\MSVC64r\include" -platform win32-msvc2015 -iconv -qt-zlib -qt-pcre -icu -I "%CD%\..\..\libICU-57.1\MSVC64r\include" -L "%CD%\..\..\libICU-57.1\MSVC64r\lib" -qt-libpng -qt-libjpeg -avx -openssl -I "%CD%\..\..\libOPENSSL-1.1.0-dev\MSVC64r\lib\include" -L "%CD%\..\..\libOPENSSL-1.1.0-dev\MSVC64r\lib\lib" -dbus-runtime -confirm-license -skip qtscript && jom
      
      [snip]
      
      cd <Qt Creator DIR> && qmake QTC_PREFIX="%ProgramData%\QtCreator\MSVC64r\dll" && jom
      
      [snip]
      
              cd utils\ && ( if not exist Makefile c:\libQT-5.7-dev\MSVC64r\lib\bin\qmake.exe c:\qtcreator-4.0.0-dev\src\src\libs\utils\utils.pro -o Makefile ) && "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.exe" -f Makefile
      
      Microsoft (R) Program Maintenance Utility Version 14.00.23506.0
      Copyright (C) Microsoft Corporation.  All rights reserved.
      
              "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.exe" -f Makefile.Release
      
      Microsoft (R) Program Maintenance Utility Version 14.00.23506.0
      Copyright (C) Microsoft Corporation.  All rights reserved.
      
              link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /DLL /SUBSYSTEM:WINDOWS /MANIFEST:embed /OUT:..\..\..\lib\qtcreator\Utils.dll @C:\Users\user\AppData\Local\Temp\nmA956.tmp
      Qt5Core.lib(qmimeprovider.obj) : error LNK2005: "int qmime_secondsBetweenChecks" (?qmime_secondsBetweenChecks@@3HA) already defined in mimeprovider.obj
         Creating library ..\..\..\lib\qtcreator\Utils.lib and object ..\..\..\lib\qtcreator\Utils.exp
      Qt5Qml.lib(qqmldebugconnector.obj) : error LNK2019: unresolved external symbol "struct QStaticPlugin const __cdecl qt_static_plugin_QQmlDebugServerFactory(void)" (?qt_static_plugin_QQmlDebugServerFactory@@YA?BUQStaticPlugin@@XZ) referenced in function "public: __cdecl StaticQQmlDebugServerFactoryPluginInstance::StaticQQmlDebugServerFactoryPluginInstance(void)" (??0StaticQQmlDebugServerFactoryPluginInstance@@QEAA@XZ)
      Qt5Qml.lib(qqmldebugconnector.obj) : error LNK2019: unresolved external symbol "struct QStaticPlugin const __cdecl qt_static_plugin_QQmlNativeDebugConnectorFactory(void)" (?qt_static_plugin_QQmlNativeDebugConnectorFactory@@YA?BUQStaticPlugin@@XZ) referenced in function "public: __cdecl StaticQQmlNativeDebugConnectorFactoryPluginInstance::StaticQQmlNativeDebugConnectorFactoryPluginInstance(void)" (??0StaticQQmlNativeDebugConnectorFactoryPluginInstance@@QEAA@XZ)
      Qt5Qml.lib(qqmldebugconnector.obj) : error LNK2019: unresolved external symbol "struct QStaticPlugin const __cdecl qt_static_plugin_QQmlInspectorServiceFactory(void)" (?qt_static_plugin_QQmlInspectorServiceFactory@@YA?BUQStaticPlugin@@XZ) referenced in function "public: __cdecl StaticQQmlInspectorServiceFactoryPluginInstance::StaticQQmlInspectorServiceFactoryPluginInstance(void)" (??0StaticQQmlInspectorServiceFactoryPluginInstance@@QEAA@XZ)
      Qt5Qml.lib(qqmldebugconnector.obj) : error LNK2019: unresolved external symbol "struct QStaticPlugin const __cdecl qt_static_plugin_QQmlProfilerServiceFactory(void)" (?qt_static_plugin_QQmlProfilerServiceFactory@@YA?BUQStaticPlugin@@XZ) referenced in function "public: __cdecl StaticQQmlProfilerServiceFactoryPluginInstance::StaticQQmlProfilerServiceFactoryPluginInstance(void)" (??0StaticQQmlProfilerServiceFactoryPluginInstance@@QEAA@XZ)
      Qt5Qml.lib(qqmldebugconnector.obj) : error LNK2019: unresolved external symbol "struct QStaticPlugin const __cdecl qt_static_plugin_QQmlDebuggerServiceFactory(void)" (?qt_static_plugin_QQmlDebuggerServiceFactory@@YA?BUQStaticPlugin@@XZ) referenced in function "public: __cdecl StaticQQmlDebuggerServiceFactoryPluginInstance::StaticQQmlDebuggerServiceFactoryPluginInstance(void)" (??0StaticQQmlDebuggerServiceFactoryPluginInstance@@QEAA@XZ)
      ..\..\..\lib\qtcreator\Utils.dll : fatal error LNK1120: 5 unresolved externals
      NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\link.EXE"' : return code '0x460'
      Stop.
      NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\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.
      

      Inherent to static builds only.

      Regards,
      Alexander

      Attachments

        Issue Links

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

          Activity

            People

              con Eike Ziller
              sav sav
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes