Link error when building Qt 5.5.1 with vs2015
-
I am building Qt 5.5.1 on Windows 10 with VC 14.0 x86 compiler (VS 2015 Community Ed.).
Initialization:
perl init-repository --no-webkit
Configuration:
call "%_qt_src_dir%\configure.bat"^ -opensource^ -confirm-license^ -prefix "%_install_dir%"^ -platform win32-msvc2015 -make-tool jom^ -mp^ -no-warnings-are-errors^ -opengl desktop^ -nomake examples^ -nomake tests^ -no-incredibuild-xge
I have got the following link error:
link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /DLL /SUBSYSTEM:WINDOWS /VERSION:5.5 /MANIFEST:embed /OUT:..\..\lib\Qt5Scriptd.dll @B:\Temp\Qt5Scriptd.dll.3464.890.jom Creating library ..\..\lib\Qt5Scriptd.lib and object ..\..\lib\Qt5Scriptd.exp JSGlobalData.obj : error LNK2019: unresolved external symbol "private: static void __cdecl QTJSC::MarkedArgumentBuffer::operator delete(void *,unsigned int)" (??3MarkedArgumentBuffer@QTJSC@@CAXPAXI@Z) referenced in function __unwindfunclet$??0JSGlobalData@QTJSC@@AAE@_N@Z$22 ..\..\lib\Qt5Scriptd.dll : fatal error LNK1120: 1 unresolved externals jom: C:\Dev\Projects\Qt5-build\windows-x86-msvc2015\qtscript\src\script\Makefile.Debug [..\..\lib\Qt5Scriptd.dll] Error 1120 jom: C:\Dev\Projects\Qt5-build\windows-x86-msvc2015\qtscript\src\script\Makefile [debug-all] Error 2 jom: C:\Dev\Projects\Qt5-build\windows-x86-msvc2015\qtscript\src\Makefile [sub-script-make_first-ordered] Error 2 jom: C:\Dev\Projects\Qt5-build\windows-x86-msvc2015\qtscript\Makefile [sub-src-make_first] Error 2 jom: C:\Dev\Projects\Qt5-build\windows-x86-msvc2015\Makefile [module-qtscript-make_first] Error 2 Error: make failed
The beginning of
Makefile
MAKEFILE = Makefile.Debug ####### Compiler, tools and options CC = cl CXX = cl DEFINES = -DUNICODE -DWIN32 -DJSC=QTJSC -Djscyyparse=qtjscyyparse -Djscyylex=qtjscyylex -Djscyyerror=qtjscyyerror -DWTF=QTWTF -DQT_NO_USING_NAMESPACE -DQLALR_NO_QSCRIPTGRAMMAR_DEBUG_INFO -DQT_BUILD_SCRIPT_LIB -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -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 -DBUILDING_QT__=1 -DUSE_SYSTEM_MALLOC -DLOG_DISABLED=1 -DBUILDING_QT__ -DBUILDING_JavaScriptCore -DBUILDING_WTF -DNOMINMAX -D_CRT_RAND_S -DWTF_USE_JAVASCRIPTCORE_BINDINGS=1 -DWTF_CHANGES=1 -DJS_NO_EXPORT -DQT_NO_EXCEPTIONS -DQT_CORE_LIB CFLAGS = -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zi -MDd -MP /Fd..\..\lib\Qt5Scriptd.pdb $(DEFINES) CXXFLAGS = -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zc:throwingNew -wd4291 -wd4344 -wd4396 -wd4503 -wd4800 -wd4819 -wd4996 -wd4396 -wd4099 -Zi -MDd -D_HAS_EXCEPTIONS=0 -MP -GR /Fd..\..\lib\Qt5Scriptd.pdb $(DEFINES) INCPATH = -IC:\Dev\Projects\Qt5\qtscript\src\script -I. -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\assembler -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\bytecode -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\bytecompiler -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\debugger -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\interpreter -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\jit -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\parser -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\pcre -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\profiler -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\runtime -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\wrec -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\wtf -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\wtf\symbian -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\wtf\unicode -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\yarr -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\API -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\ForwardingHeaders -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\generated -I..\..\include -I..\..\include\QtScript -I..\..\include\QtScript\5.5.1 -I..\..\include\QtScript\5.5.1\QtScript -Itmp -IC:/Dev/Projects/Qt5/qtscript/src/3rdparty/javascriptcore/WebKit/qt/Api -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\pcre -IC:/Dev/Projects/Qt5/qtscript/src/3rdparty/javascriptcore/JavaScriptCore/tmp -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\parser -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\bytecompiler -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\debugger -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\runtime -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\wtf -IC:/Dev/Projects/Qt5/qtscript/src/script/../3rdparty/javascriptcore/JavaScriptCore/unicode -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\interpreter -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\jit -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\profiler -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\wrec -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\API -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\bytecode -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\assembler -IC:\Dev\Projects\Qt5\qtscript\src\3rdparty\javascriptcore\JavaScriptCore\generated -IC:\Dev\Projects\Qt5\qtscript\src\script -IC:\Dev\Projects\Qt5\qtscript\src\script\parser -IC:\Dev\Projects\Qt5-build\windows-x86-msvc2015\qtbase\include\QtCore\5.5.1 -IC:\Dev\Projects\Qt5-build\windows-x86-msvc2015\qtbase\include\QtCore\5.5.1\QtCore -IC:\Dev\Projects\Qt5-build\windows-x86-msvc2015\qtbase\include -IC:\Dev\Projects\Qt5-build\windows-x86-msvc2015\qtbase\include\QtCore -I.moc\debug -IC:\Dev\Projects\Qt5\qtbase\mkspecs\win32-msvc2015 LINKER = link LFLAGS = /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /DLL /SUBSYSTEM:WINDOWS /VERSION:5.5 LIBS = /LIBPATH:C:\Dev\Projects\Qt5-build\windows-x86-msvc2015\qtbase\lib C:\Dev\Projects\Qt5-build\windows-x86-msvc2015\qtbase\lib\Qt5Cored.lib obj\debug\debug\Qt5Scriptd_resource.res winmm.lib QMAKE = C:\Dev\Projects\Qt5-build\windows-x86-msvc2015\qtbase\bin\qmake IDC = idc IDL = midl ZIP = zip -r -9 DEF_FILE = RES_FILE = obj\debug\debug\Qt5Scriptd_resource.res COPY = copy /y SED = $(QMAKE) -install sed COPY_FILE = copy /y COPY_DIR = xcopy /s /q /y /i DEL_FILE = del DEL_DIR = rmdir MOVE = move CHK_DIR_EXISTS= if not exist MKDIR = mkdir INSTALL_FILE = copy /y INSTALL_PROGRAM = copy /y INSTALL_DIR = xcopy /s /q /y /i
-
There is no such error for
Qt5Script.dll
, i.e. something wrong with Debug config. -
Hi,
Do you have python installed properly in available in the PATH environment variable ?
-
Sure. Python, Perl, and Jom are installed and paths added into the
PATH
env. variable. The%VS140COMNTOOLS%..\..\VC\vcvarsall.bat x86
is called before the configure and the build steps.And the following modules are built (before error):
qt3d qtactiveqt qtbase qtconnectivity qtdeclarative qtimageformats qtlocation qtmultimedia qtsensors qtserialport qtsvg qttools qtwebchannel qtwebsockets qtwinextras qtxmlpatterns
Building with MSVC 2012 is OK.
Building with MSVC 2015 is failed. The cause is
void* operator new(size_t, void*); void operator delete(void*, size_t);
declared, but not defined in the
qtscript\src\3rdparty\javascriptcore\JavaScriptCore\runtime\ArgList.h
.My question on http://stackoverflow.com/questions/33421592/linker-error-while-building-with-msvc-2015-other-cc-is-ok
-
Following your answer on SO, did you submit a patch for Qt ?
-
Nobody approves that the issue is present. So, I have created QTBUG-49163.
-
Thanks for sharing the link !