Linker error in build Qt 5.15 for Windows
-
Hello, colleagues!
I have a linker error when I try to build Qt 5.15 for Windows in Visual Studio Community edition.
cl -c -FI..\..\include\QtQml\QtQmlDepends -Yu..\..\include\QtQml\QtQmlDepends -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_LINKED_LIST -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -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_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_EXCEPTIONS -DQT_NETWORK_LIB -DQT_CORE_LIB -D_WINDLL -I. -Imemory -I. -Icompiler -I. -Ijsruntime -I. -Ijit -I. -Idebugger -Iqmldirparser -I. -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..\..\include -I..\..\include\QtQml -I..\..\include\QtQml\5.15.2 -I..\..\include\QtQml\5.15.2\QtQml -Itmp -I.generated\debug -I. -I.tracegen\debug -IC:\Users\rusinov\Qt\qt-everywhere-src-5.15.2\qtbase\include\QtCore\5.15.2 -IC:\Users\rusinov\Qt\qt-everywhere-src-5.15.2\qtbase\include\QtCore\5.15.2\QtCore -IC:\Users\rusinov\Qt\qt-everywhere-src-5.15.2\qtbase\include -IC:\Users\rusinov\Qt\qt-everywhere-src-5.15.2\qtbase\include\QtNetwork -IC:\Users\rusinov\Qt\qt-everywhere-src-5.15.2\qtbase\include\QtCore -I.moc\debug -IC:\Users\rusinov\Qt\qt-everywhere-src-5.15.2\qtbase\mkspecs\win32-msvc -Fo.obj\debug\ @C:\Users\rusinov\AppData\Local\Temp\nm51A5.tmp moc_qqmlpropertymap.cpp moc_qv4debugging_p.cpp moc_qv4promiseobject_p.cpp moc_qqmlengine_p.cpp moc_qqmlcomponentattached_p.cpp moc_qqmltypeloadernetworkreplyproxy_p.cpp moc_qqmldebugservicefactory_p.cpp moc_qqmldebugserver_p.cpp moc_qqmldebugserverconnection_p.cpp Создание кода... link /NOLOGO /DYNAMICBASE /NXCOMPAT /BASE:0x66000000 /DEBUG /DLL /SUBSYSTEM:WINDOWS /VERSION:5.15 /MANIFEST:embed /OUT:..\..\lib\Qt5Qmld.dll @C:\Users\rusinov\AppData\Local\Temp\nm558E.tmp Create library ..\..\lib\Qt5Qmld.lib and object ..\..\lib\Qt5Qmld.exp YarrInterpreter.obj : error LNK2019: unresolved external "class std::unique_ptr<struct JSC::Yarr::CharacterClass,struct std::default_delete<struct JSC::Yarr::CharacterClass> > __cdecl JSC::Yarr::newlineCreate(void)" (?newlineCreate@Yarr@JSC@@YA?AV?$unique_ptr@UCharacterClass@Yarr@JSC@@U?$default_delete@UCharacterClass@Yarr@JSC@@@std@@@std@@XZ) in function "public: struct JSC::Yarr::CharacterClass * __thiscall JSC::Yarr::YarrPattern::newlineCharacterClass(void)" (?newlineCharacterClass@YarrPattern@Yarr@JSC@@QAEPAUCharacterClass@23@XZ). YarrJIT.obj : error LNK2001: unresolved external "class std::unique_ptr<struct JSC::Yarr::CharacterClass,struct std::default_delete<struct JSC::Yarr::CharacterClass> > __cdecl JSC::Yarr::newlineCreate(void)" (?newlineCreate@Yarr@JSC@@YA?AV?$unique_ptr@UCharacterClass@Yarr@JSC@@U?$default_delete@UCharacterClass@Yarr@JSC@@@std@@@std@@XZ). YarrPattern.obj : error LNK2001: unresolved external "class std::unique_ptr<struct JSC::Yarr::CharacterClass,struct std::default_delete<struct JSC::Yarr::CharacterClass> > __cdecl JSC::Yarr::newlineCreate(void)" (?newlineCreate@Yarr@JSC@@YA?AV?$unique_ptr@UCharacterClass@Yarr@JSC@@U?$default_delete@UCharacterClass@Yarr@JSC@@@std@@@std@@XZ). YarrInterpreter.obj : error LNK2019: ссылка на неразрешенный внешний символ "class std::unique_ptr<struct JSC::Yarr::CharacterClass,struct std::default_delete<struct JSC::Yarr::CharacterClass> > __cdecl JSC::Yarr::wordcharCreate(void)" (?wordcharCreate@Yarr@JSC@@YA?AV?$unique_ptr@UCharacterClass@Yarr@JSC@@U?$default_delete@UCharacterClass@Yarr@JSC@@@std@@@std@@XZ) в функции "public: struct JSC::Yarr::CharacterClass * __thiscall JSC::Yarr::YarrPattern::wordcharCharacterClass(void)" (?wordcharCharacterClass@YarrPattern@Yarr@JSC@@QAEPAUCharacterClass@23@XZ). YarrJIT.obj : error LNK2001: неразрешенный внешний символ "class std::unique_ptr<struct JSC::Yarr::CharacterClass,struct std::default_delete<struct JSC::Yarr::CharacterClass> > __cdecl JSC::Yarr::wordcharCreate(void)" (?wordcharCreate@Yarr@JSC@@YA?AV?$unique_ptr@UCharacterClass@Yarr@JSC@@U?$default_delete@UCharacterClass@Yarr@JSC@@@std@@@std@@XZ). YarrPattern.obj : error LNK2001: неразрешенный внешний символ "class std::unique_ptr<struct JSC::Yarr::CharacterClass,struct std::default_delete<struct JSC::Yarr::CharacterClass> > __cdecl JSC::Yarr::wordcharCreate(void)" (?wordcharCreate@Yarr@JSC@@YA?AV?$unique_ptr@UCharacterClass@Yarr@JSC@@U?$default_delete@UCharacterClass@Yarr@JSC@@@std@@@std@@XZ). YarrInterpreter.obj : error LNK2019: unresolved external symbol "class std::unique_ptr<struct JSC::Yarr::CharacterClass,struct std::default_delete<struct JSC::Yarr::CharacterClass> > __cdecl JSC::Yarr::wordUnicodeIgnoreCaseCharCreate(void)" (?wordUnicodeIgnoreCaseCharCreate@Yarr@JSC@@YA?AV?$unique_ptr@UCharacterClass@Yarr@JSC@@U?$default_delete@UCharacterClass@Yarr@JSC@@@std@@@std@@XZ) in function "public: struct JSC::Yarr::CharacterClass * __thiscall JSC::Yarr::YarrPattern::wordUnicodeIgnoreCaseCharCharacterClass(void)" (?wordUnicodeIgnoreCaseCharCharacterClass@YarrPattern@Yarr@JSC@@QAEPAUCharacterClass@23@XZ). YarrJIT.obj : error LNK2001: unresolved external symbol "class std::unique_ptr<struct JSC::Yarr::CharacterClass,struct std::default_delete<struct JSC::Yarr::CharacterClass> > __cdecl JSC::Yarr::wordUnicodeIgnoreCaseCharCreate(void)" (?wordUnicodeIgnoreCaseCharCreate@Yarr@JSC@@YA?AV?$unique_ptr@UCharacterClass@Yarr@JSC@@U?$default_delete@UCharacterClass@Yarr@JSC@@@std@@@std@@XZ). YarrPattern.obj : error LNK2001: unresolved external "class std::unique_ptr<struct JSC::Yarr::CharacterClass,struct std::default_delete<struct JSC::Yarr::CharacterClass> > __cdecl JSC::Yarr::wordUnicodeIgnoreCaseCharCreate(void)" (?wordUnicodeIgnoreCaseCharCreate@Yarr@JSC@@YA?AV?$unique_ptr@UCharacterClass@Yarr@JSC@@U?$default_delete@UCharacterClass@Yarr@JSC@@@std@@@std@@XZ). YarrPattern.obj : error LNK2019: unresolved external "class std::unique_ptr<struct JSC::Yarr::CharacterClass,struct std::default_delete<struct JSC::Yarr::CharacterClass> > __cdecl JSC::Yarr::digitsCreate(void)" (?digitsCreate@Yarr@JSC@@YA?AV?$unique_ptr@UCharacterClass@Yarr@JSC@@U?$default_delete@UCharacterClass@Yarr@JSC@@@std@@@std@@XZ) in function "public: struct JSC::Yarr::CharacterClass * __thiscall JSC::Yarr::YarrPattern::digitsCharacterClass(void)" (?digitsCharacterClass@YarrPattern@Yarr@JSC@@QAEPAUCharacterClass@23@XZ). YarrPattern.obj : error LNK2019: unresolved external "class std::unique_ptr<struct JSC::Yarr::CharacterClass,struct std::default_delete<struct JSC::Yarr::CharacterClass> > __cdecl JSC::Yarr::spacesCreate(void)" (?spacesCreate@Yarr@JSC@@YA?AV?$unique_ptr@UCharacterClass@Yarr@JSC@@U?$default_delete@UCharacterClass@Yarr@JSC@@@std@@@std@@XZ) in function "public: struct JSC::Yarr::CharacterClass * __thiscall JSC::Yarr::YarrPattern::spacesCharacterClass(void)" (?spacesCharacterClass@YarrPattern@Yarr@JSC@@QAEPAUCharacterClass@23@XZ). YarrPattern.obj : error LNK2019: unresolved external "class std::unique_ptr<struct JSC::Yarr::CharacterClass,struct std::default_delete<struct JSC::Yarr::CharacterClass> > __cdecl JSC::Yarr::nondigitsCreate(void)" (?nondigitsCreate@Yarr@JSC@@YA?AV?$unique_ptr@UCharacterClass@Yarr@JSC@@U?$default_delete@UCharacterClass@Yarr@JSC@@@std@@@std@@XZ) in function "public: struct JSC::Yarr::CharacterClass * __thiscall JSC::Yarr::YarrPattern::nondigitsCharacterClass(void)" (?nondigitsCharacterClass@YarrPattern@Yarr@JSC@@QAEPAUCharacterClass@23@XZ). YarrPattern.obj : error LNK2019: unresolved external symbol "class std::unique_ptr<struct JSC::Yarr::CharacterClass,struct std::default_delete<struct JSC::Yarr::CharacterClass> > __cdecl JSC::Yarr::nonspacesCreate(void)" (?nonspacesCreate@Yarr@JSC@@YA?AV?$unique_ptr@UCharacterClass@Yarr@JSC@@U?$default_delete@UCharacterClass@Yarr@JSC@@@std@@@std@@XZ) in function "public: struct JSC::Yarr::CharacterClass * __thiscall JSC::Yarr::YarrPattern::nonspacesCharacterClass(void)" (?nonspacesCharacterClass@YarrPattern@Yarr@JSC@@QAEPAUCharacterClass@23@XZ). YarrPattern.obj : error LNK2019: unresolved external symbol "class std::unique_ptr<struct JSC::Yarr::CharacterClass,struct std::default_delete<struct JSC::Yarr::CharacterClass> > __cdecl JSC::Yarr::nonwordcharCreate(void)" (?nonwordcharCreate@Yarr@JSC@@YA?AV?$unique_ptr@UCharacterClass@Yarr@JSC@@U?$default_delete@UCharacterClass@Yarr@JSC@@@std@@@std@@XZ) in function "public: struct JSC::Yarr::CharacterClass * __thiscall JSC::Yarr::YarrPattern::nonwordcharCharacterClass(void)" (?nonwordcharCharacterClass@YarrPattern@Yarr@JSC@@QAEPAUCharacterClass@23@XZ). YarrPattern.obj : error LNK2019:unresolved external symbol "class std::unique_ptr<struct JSC::Yarr::CharacterClass,struct std::default_delete<struct JSC::Yarr::CharacterClass> > __cdecl JSC::Yarr::nonwordUnicodeIgnoreCaseCharCreate(void)" (?nonwordUnicodeIgnoreCaseCharCreate@Yarr@JSC@@YA?AV?$unique_ptr@UCharacterClass@Yarr@JSC@@U?$default_delete@UCharacterClass@Yarr@JSC@@@std@@@std@@XZ) in function "public: struct JSC::Yarr::CharacterClass * __thiscall JSC::Yarr::YarrPattern::nonwordUnicodeIgnoreCaseCharCharacterClass(void)" (?nonwordUnicodeIgnoreCaseCharCharacterClass@YarrPattern@Yarr@JSC@@QAEPAUCharacterClass@23@XZ). ..\..\lib\Qt5Qmld.dll : fatal error LNK1120: unresolved external elements: 9 NMAKE : fatal error U1077: link /NOLOGO /DYNAMICBASE /NXCOMPAT /BASE:0x66000000 /DEBUG /DLL /SUBSYSTEM:WINDOWS /VERSION:5.15 /MANIFEST:embed /OUT:..\..\lib\Qt5Qmld.dll @C:\Users\rusinov\AppData\Local\Temp\nm558E.tmp : return code "0x460" Stop. NMAKE : fatal error U1077: "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\HostX86\x86\nmake.exe" -f Makefile.Debug : return code "0x2" Stop. NMAKE : fatal error U1077: cd qml\ && ( if not exist Makefile C:\Users\rusinov\Qt\qt-everywhere-src-5.15.2\qtbase\bin\qmake.exe -o Makefile C:\Users\rusinov\Qt\qt-everywhere-src-5.15.2\qtdeclarative\src\qml\qml.pro ) && "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\HostX86\x86\nmake.exe" -f Makefile : return code "0x2" Stop. NMAKE : fatal error U1077: cd src\ && ( if not exist Makefile C:\Users\rusinov\Qt\qt-everywhere-src-5.15.2\qtbase\bin\qmake.exe -o Makefile C:\Users\rusinov\Qt\qt-everywhere-src-5.15.2\qtdeclarative\src\src.pro ) && "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\HostX86\x86\nmake.exe" -f Makefile : return code "0x2" Stop. NMAKE : fatal error U1077: cd qtdeclarative\ && ( if not exist Makefile C:\Users\rusinov\Qt\qt-everywhere-src-5.15.2\qtbase\bin\qmake.exe -o Makefile C:\Users\rusinov\Qt\qt-everywhere-src-5.15.2\qtdeclarative\qtdeclarative.pro ) && "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\HostX86\x86\nmake.exe" -f Makefile : return code "0x2" Stop.
I configured Qt using this command
configure -debug -skip qtwebengine -opensource
I know that these errors were connected with C++11 standard, but which way I can add this to Visual Studio nmake ?
-
@YuriyRusinov
I don't build for Windows, and it probably won't make any difference, but you could add-platform win32-msvc
to yourconfigure
in case that addresses this issue? -
Hi,
Which version of visual studio are you using ?
By the way, since you are building Qt yourself, you might want to grab the latest sources available at this time. -
2022 Community Edition.
-
Problem was solved, because some modules were skipped. Result configure is
configure.bat -debug -nomake examples -nomake tests -skip qtwebengine -skip declarative -skip qtdeclarative -skip qtlocation -skip qtmultimedia -skip qtquickcontrols -skip qtsensors -skip qttools -skip qtwebsockets -skip qtwinextras -skip qtwebchannel -skip qtwebengine -opensource -platform win32-msvc
-
-
Hello again!
If I compile and install Qt, but sometimes later I need some skipped libraries, which way I can add them?
-
-
@YuriyRusinov said in Linker error in build Qt 5.15 for Windows:
which way I can add them?
By building these modules
-
If you still have the old folder where you compiled, it will be a lot faster because make will just skip the things that have already been built. On the other hand, ther might also be some defines which are added, so I'm not entirely sure if this triggers a full rebuild (or should retrigger, but doesn't). You'll only be on the safe side when you do a fresh compile.