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

'unresolved external symbol' errors for 'Debugger' plugin builds using ICC on Windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • Qt Creator 4.0.0
    • Qt Creator 4.0.0-beta1
    • All Other Issues
    • None

    Description

      Hi, Everyone,

      Got errors while building Qt Creator:

      configure -prefix "%CD%\..\ICC64d\dll" -debug -opensource -c++std c++11 -shared -plugin-sql-sqlite -opengl dynamic -openvg -platform win32-icc -iconv -qt-zlib -qt-pcre -icu -I "%CD%\..\..\libICU-57.1\ICC64d\include" -L "%CD%\..\..\libICU-57.1\ICC64d\lib" -qt-libpng -qt-libjpeg -avx -openssl -I "%CD%\..\..\libOPENSSL-1.1.0-dev\ICC64d\dll\include" -L "%CD%\..\..\libOPENSSL-1.1.0-dev\ICC64d\dll\lib" -dbus-runtime -confirm-license -skip qtscript && jom
      
      [snip]
      
      cd <Qt Creator DIR> && qmake QTC_PREFIX="%ProgramData%\QtCreator\ICC64d\dll" && jom
      
      [snip]
      
              xilink /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /DLL /SUBSYSTEM:CONSOLE /OUT:..\..\..\lib\qtcreator\plugins\Debuggerd.dll @C:\Users\user\AppData\Local\Temp\nmA10C.tmp
         Creating library ..\..\..\lib\qtcreator\plugins\Debuggerd.lib and object ..\..\..\lib\qtcreator\plugins\Debuggerd.exp
      registryaccess.obj : error LNK2019: unresolved external symbol __imp_RegQueryValueExW referenced in function "bool __cdecl RegistryAccess::registryReadBinaryKey(struct HKEY__ *,wchar_t const *,class QByteArray *,class QString *)" (?registryReadBinaryKey@RegistryAccess@@YA_NPEAUHKEY__@@PEB_WPEAVQByteArray@@PEAVQString@@@Z)
      registryaccess.obj : error LNK2019: unresolved external symbol __imp_RegOpenKeyExW referenced in function "bool __cdecl RegistryAccess::openRegistryKey(struct HKEY__ *,wchar_t const *,bool,struct HKEY__ * *,class QString *)" (?openRegistryKey@RegistryAccess@@YA_NPEAUHKEY__@@PEB_W_NPEAPEAU2@PEAVQString@@@Z)
      registerpostmortemaction.obj : error LNK2019: unresolved external symbol __imp_RegCloseKey referenced in function "public: virtual void __cdecl Debugger::Internal::RegisterPostMortemAction::readSettings(class QSettings const *)" (?readSettings@RegisterPostMortemAction@Internal@Debugger@@UEAAXPEBVQSettings@@@Z)
      ..\..\..\lib\qtcreator\plugins\Debuggerd.dll : fatal error LNK1120: 3 unresolved externals
      NMAKE : fatal error U1077: '"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\bin\intel64\xilink.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 ICC builds only.

      Could be fixed by replacing in file

      <QtCreator-4.0.0-dev>\src\shared\registryaccess\registryaccess.pri
      

      string win32-msvc* with win32-msvc* | win32-icc (or even with msvc, as Oswald Buddenhagen mentioned in patch 155151).

      More common solution would be applying this patch to all *.pri and *.pro files of Qt Creator sources, which contain strings win32-msvc*. In addition it fixes ICC warnings:

      icl: command line warning #10159: invalid argument for option '/fp'
      icl: command line warning #10006: ignoring unknown option '/finline-functions'
      

      while building Qt Creator (see file <QtCreator-4.0.0-dev>\src\libs\3rdparty\botan\botan.pri).
      Same could be done to Qt Build Suite and Qt Installer Framework sources, but that's another story.

      Regards,
      Alexander

      Attachments

        Activity

          People

            davschul David Schulz
            sav sav
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: