Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

build error



  • How do I fix this error?

        "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\nmake.exe" -f Makefile.Debug all
    

    Microsoft (R) Program Maintenance Utility Version 14.16.27026.1
    Copyright (C) Microsoft Corporation. All rights reserved.

        cl -c -FIQtQmlDepends -YuQtQmlDepends -Fp.pch\debug\Qt5Qmld_pch.pch -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -Zi -MDd -std:c++17 -utf-8 /wd4530 /wd4577 -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 /Fd.obj\debug\Qt5Qmld.vc.pdb -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DQT_NO_URL_CAST_FROM_STRING -DQT_NO_INTEGER_EVENT_COORDINATES -D_CRT_SECURE_NO_WARNINGS -DQT_NO_FOREACH -DWTF_EXPORT_PRIVATE= -DJS_EXPORT_PRIVATE= -DENABLE_ASSEMBLER_WX_EXCLUSIVE=1 -DWTFReportAssertionFailure=qmlWTFReportAssertionFailure -DWTFReportAssertionFailureWithMessage=qmlWTFReportAssertionFailureWithMessage -DWTFReportBacktrace=qmlWTFReportBacktrace -DWTFInvokeCrashHook=qmlWTFInvokeCrashHook -DNOMINMAX -DENABLE_LLINT=0 -DENABLE_DFG_JIT=0 -DENABLE_DFG_JIT_UTILITY_METHODS=1 -DENABLE_JIT_CONSTANT_BLINDING=0 -DBUILDING_QT__ -DWTF_USE_UDIS86=0 -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_QML_LIB -DQT_BUILDING_QT -D_USE_MATH_DEFINES -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_NO_EXCEPTIONS -DQT_NETWORK_LIB -DQT_CORE_LIB -D_WINDLL -I. -Imemory -I. -Icompiler -I. -Ijsruntime -I. -Ijit -I. -Idebugger -Ianimations -I..\3rdparty\masm\jit -I..\3rdparty\masm\assembler -I..\3rdparty\masm\runtime -I..\3rdparty\masm\wtf -I..\3rdparty\masm\stubs -I..\3rdparty\masm\stubs\runtime -I..\3rdparty\masm\stubs\wtf -I..\3rdparty\masm -I..\3rdparty\masm\disassembler -I..\3rdparty\masm\disassembler\udis86 -I.generated\debug -I..\..\include -I..\..\include\QtQml -I..\..\include\QtQml\5.12.0 -I..\..\include\QtQml\5.12.0\QtQml -Itmp -I. -IC:\Qt\5.12.0\Src\qtbase\include\QtCore\5.12.0 -IC:\Qt\5.12.0\Src\qtbase\include\QtCore\5.12.0\QtCore -IC:\Qt\5.12.0\Src\qtbase\include -IC:\Qt\5.12.0\Src\qtbase\include\QtNetwork -IC:\Qt\5.12.0\Src\qtbase\include\QtCore -I.moc\debug -IC:\Qt\5.12.0\Src\qtbase\mkspecs\win32-msvc -Fo.obj\debug\ @C:\Users\helpdesk\AppData\Local\Temp\nm122C.tmp
    

    qqmljslexer.cpp
    parser\qqmljslexer.cpp: fatal error C1853: '.pch\debug\Qt5Qmld_pch.pch' precompiled header file is from a previous version of the compiler, or the precompiled header is C++ and you are using it from C (or vice versa)
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\cl.EXE"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86\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.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Delete the pre-compiled headers and restart the build.


  • Lifetime Qt Champion

    Hi and welcome to the forums
    Did you recently upgrade visual studio ?



  • Did that and it resolved it. Thanks!


  • Lifetime Qt Champion

    @MohsinM. So please mark this topic as SOLVED. Thanks!


Log in to reply