使用webkit构建Qt中的NMAKE致命错误U1077

时间:2016-08-23 20:48:47

标签: c++ qt visual-studio-2013 qtwebkit

我正在尝试使用包含webkit的Visual Studio 2013 SP5将Qt 4.8.6构建为x64静态库,但是在运行nmake几分钟后我收到此错误:

Generating Code...
        lib /NOLOGO  /OUT:..\..\lib\QtDeclarative.lib @C:\Users\Siavash\AppData\Local\Temp\nm3EA3.tmp qdeclarativeevents.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library qlistmodelinterface.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
        cd src\3rdparty\webkit\Source\ && C:\MSVS2013\VC\BIN\nmake.exe -f Makefile.WebKit

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

        cd JavaScriptCore\ && C:\MSVS2013\VC\BIN\nmake.exe -f Makefile.WebKit

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

        c:\Qt\4.8.6\bin\qmake.EXE -o Makefile.WebKit JavaScriptCore.pro
        C:\MSVS2013\VC\BIN\nmake.exe -f Makefile.WebKit.Release

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

        cl -c -nologo -Zm200 -Zc:wchar_t- -FS -wd4291 -wd4344 -wd4396 -wd4503 -wd4800 -wd4819 -wd4996 -O2 -MD -GR -EHsc -DUNICODE -DWIN32 -DNDEBUG -DBUILDING_QT__=1 -DNDEBUG -DQT_ASCII_CAST_WARNINGS -D_HAS_TR1=0 -DBUILDING_JavaScriptCore -DBUILDING_WTF -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"..\..\..\..\..\include\QtCore" -I"..\..\..\..\..\include" -I"." -I"..\..\Source" -I"..\ThirdParty" -I"assembler" -I"bytecode" -I"bytecompiler" -I"heap" -I"dfg" -I"debugger" -I"interpreter" -I"jit" -I"parser" -I"profiler" -I"runtime" -I"wtf" -I"wtf\gobject" -I"c:\Qt\4.8.6\src\3rdparty\webkit\Source\JavaScriptCore\wtf\symbian" -I"wtf\unicode" -I"yarr" -I"API" -I"ForwardingHeaders" -I"generated" -I"os-win32" -I"..\..\Source" -I"..\..\include" -I"\include\QtWebKit" -I"\include" -I"..\..\..\..\..\include\ActiveQt" -I"tmp\moc\release_static" -I"..\..\..\..\..\mkspecs\win32-msvc2013" -Fotmp\obj\release_static\ @C:\Users\Siavash\AppData\Local\Temp\nm4880.tmp DateMath.cpp 
.\wtf/MathExtras.h(117) : error C2491: 'round' : definition of dllimport function not allowed
.\wtf/MathExtras.h(124) : error C2491: 'roundf' : definition of dllimport function not allowed 
.\wtf/MathExtras.h(146) : error C2084: function 'bool signbit(double)' already has a body
        C:\MSVS2013\VC\INCLUDE\math.h(324) : see previous definition of 'signbit'
        c:\qt\4.8.6\src\3rdparty\webkit\source\javascriptcore\runtime\JSValueInlineMethods.h(168) : error C2264: 'signbit' : error in function definition or declaration; function not called dtoa.cpp
.\wtf/MathExtras.h(117) : error C2491: 'round' : definition of dllimport function not allowed
.\wtf/MathExtras.h(124) : error C2491: 'roundf' : definition of dllimport function not allowed           
.\wtf/MathExtras.h(146) : error C2084: function 'bool signbit(double)' already has a body
        C:\MSVS2013\VC\INCLUDE\math.h(324) : see previous definition of 'signbit' DecimalNumber.cpp 
.\wtf/MathExtras.h(117) : error C2491: 'round' : definition of dllimport function not allowed 
.\wtf/MathExtras.h(124) : error C2491: 'roundf' : definition of dllimport function not allowed 
.\wtf/MathExtras.h(146) : error C2084: function 'bool signbit(double)' already has a body
        C:\MSVS2013\VC\INCLUDE\math.h(324) : see previous definition of 'signbit' Generating Code... 
    NMAKE : fatal error U1077: 'C:\MSVS2013\VC\BIN\x86_amd64\cl.EXE' : return code '0x2' Stop. 
    NMAKE : fatal error U1077: 'C:\MSVS2013\VC\BIN\nmake.exe' : return code '0x2' Stop. 
    NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop. NMAKE : fatal error U1077: 'cd' : return code '0x2' Stop.

当我没有显式配置qt来构建webkit时,这个问题不存在,即使它是默认选项,也不会以其他方式构建。 这也是我使用的配置:

configure -opensource -release -static -webkit -platform win32-msvc2013

我理解我的问题可能类似于this one,但由于Qt 4.8.6支持Visual Studio 2013,我认为这个问题有不同的原因。此外,我已经尝试移动所有必需的包,甚至重新安装VS,以确保我使用的PATH不包含任何空格或不“太长”。我搜索了很多指南和帖子但似乎没有任何帮助我。 有什么东西可能会丢失吗?

0 个答案:

没有答案