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

windeplyqt build fails with link error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 6.0.0
    • Build System
    • None
    • Windows 10, Visual Studio 2019
    • Windows

    Description

      I downloaded the Qt6 source zip. When trying to build with the following configure options:

       

       

      -opensource -debug-and-release -c++std c++17 -opengl desktop -nomake examples -nomake tests -confirm-license -skip qtdoc -skip qtquickcontrols2 -skip qtquick3d -skip qtquicktimeline -skip qttranslations -qtnamespace MyAppQt_6_0_0 -prefix C:\Qt-6.0.0-Build\qtbase
      

       

      I get the following error:

       

      [6417/6560] Linking CXX executable qtbase\bin\windeployqt.exe
      FAILED: qtbase/bin/windeployqt.exe 
      cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=qttools\src\windeployqt\CMakeFiles\windeployqt.dir\Release --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~1\2019\COMMUN~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x64\link.exe /nologo qttools\src\windeployqt\CMakeFiles\windeployqt.dir\Release\windeployqt_autogen\mocs_compilation.cpp.obj qttools\src\windeployqt\CMakeFiles\windeployqt.dir\Release\__\shared\winutils\elfreader.cpp.obj qttools\src\windeployqt\CMakeFiles\windeployqt.dir\Release\__\shared\winutils\qmlutils.cpp.obj qttools\src\windeployqt\CMakeFiles\windeployqt.dir\Release\__\shared\winutils\utils.cpp.obj qttools\src\windeployqt\CMakeFiles\windeployqt.dir\Release\main.cpp.obj /out:qtbase\bin\windeployqt.exe /implib:qttools\src\windeployqt\Release\windeployqt.lib /pdb:qtbase\bin\windeployqt.pdb /version:0.0 /machine:x64 /INCREMENTAL:NO /subsystem:console -DYNAMICBASE -NXCOMPAT -OPT:REF -OPT:ICF qttools\src\windeployqt\CMakeFiles\windeployqt_rc.dir\Release\Release\windeployqt_resource.rc.res qtbase\lib\Qt6Core.lib shlwapi.lib mpr.lib userenv.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
      LINK: command "C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x64\link.exe /nologo qttools\src\windeployqt\CMakeFiles\windeployqt.dir\Release\windeployqt_autogen\mocs_compilation.cpp.obj qttools\src\windeployqt\CMakeFiles\windeployqt.dir\Release\__\shared\winutils\elfreader.cpp.obj qttools\src\windeployqt\CMakeFiles\windeployqt.dir\Release\__\shared\winutils\qmlutils.cpp.obj qttools\src\windeployqt\CMakeFiles\windeployqt.dir\Release\__\shared\winutils\utils.cpp.obj qttools\src\windeployqt\CMakeFiles\windeployqt.dir\Release\main.cpp.obj /out:qtbase\bin\windeployqt.exe /implib:qttools\src\windeployqt\Release\windeployqt.lib /pdb:qtbase\bin\windeployqt.pdb /version:0.0 /machine:x64 /INCREMENTAL:NO /subsystem:console -DYNAMICBASE -NXCOMPAT -OPT:REF -OPT:ICF qttools\src\windeployqt\CMakeFiles\windeployqt_rc.dir\Release\Release\windeployqt_resource.rc.res qtbase\lib\Qt6Core.lib shlwapi.lib mpr.lib userenv.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:qtbase\bin\windeployqt.exe.manifest" failed (exit code 1120) with the following output:
      MSVCRT.lib(exe_main.obj) : error LNK2019: unresolved external symbol main referenced in function "int __cdecl __scrt_common_main_seh(void)" (?__scrt_common_main_seh@@YAHXZ)
       Hint on symbols that are defined and could potentially match:
       "int __cdecl MyAppQt_6_0_0::main(int,char * *)" (?main@MyAppQt_6_0_0@@YAHHPEAPEAD@Z)
      qtbase\bin\windeployqt.exe : fatal error LNK1120: 1 unresolved externals
      

       

      Attachments

        Issue Links

          Activity

            People

              qtbuildsystem Qt Build System Team
              gvanvoor Gregory Van Vooren
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: