使用msvc 2010进行Qt 5.5编译时出现错误C2872

时间:2017-06-08 21:59:25

标签: qt visual-studio-2010 compiler-errors ambiguity

我正在尝试使用msvc 2010编译器编译Qt 5.5,但没有运气。 我的系统符合Qt for Windows - Requirements页面上的所有要求,我尝试了不同的配置,但每个配置都失败了。

每次编译失败后我都会运行

nmake clean

只是为了确保即将进行的编译没有问题。

我的实际配置如下:

configure -release -opensource -confirm-license

-platform win32-msvc2010

在发布之前,我在Google上搜索过但没有运气!

我面临的问题是:

Microsoft (R) Program Maintenance Utility   versione 10.00.30319.01
Copyright (C) Microsoft Corporation. Tutti i diritti riservati.

        cl -c -Yc -Fp.pch\release\Qt5Versit_pch.pch -Fo.pch\release\Qt5Versit_pch.obj -nologo -Zc:wchar_t -arch:SSE2 -O2 -MD -GR -W3 -w34100 -w34189 -w44996 -DUNICODE -DWIN32 -DQT_BUILD_VERSIT_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 -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_CONTACTS_LIB -DQT_CORE_LIB -DNDEBUG -I. -IC:\Qt\qt5\qtbase\include -IC:\Qt\qt5\qtbase\include\QtVersit -IC:\Qt\qt5\qtbase\include\QtVersit\0.0.0 -IC:\Qt\qt5\qtbase\include\QtVersit\0.0.0\QtVersit -Itmp -IC:\Qt\qt5\qtbase\include\QtContacts -IC:\Qt\qt5\qtbase\include\QtCore -I.moc\release -IC:\Qt\qt5\qtbase\mkspecs\win32-msvc2010 -TP C:\Qt\qt5\qtbase\include\QtVersit\QtVersitDepends
QtVersitDepends
        C:\Qt\qt5\qtbase\bin\moc.exe -DUNICODE -DWIN32 -DQT_BUILD_VERSIT_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 -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_CONTACTS_LIB -DQT_CORE_LIB -DNDEBUG -D_MSC_VER=1600 -D_WIN32 -IC:/Qt/qt5/qtbase/mkspecs/win32-msvc2010 -IC:/Qt/qt5/qtpim/src/versit -IC:/Qt/qt5/qtbase/include -IC:/Qt/qt5/qtbase/include/QtVersit -IC:/Qt/qt5/qtbase/include/QtVersit/0.0.0 -IC:/Qt/qt5/qtbase/include/QtVersit/0.0.0/QtVersit -IC:/Qt/qt5/qtpim/src/versit/tmp -IC:/Qt/qt5/qtbase/include/QtContacts -IC:/Qt/qt5/qtbase/include/QtCore qversitreader.h -o .moc\release\moc_qversitreader.cpp
        C:\Qt\qt5\qtbase\bin\moc.exe -DUNICODE -DWIN32 -DQT_BUILD_VERSIT_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 -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_CONTACTS_LIB -DQT_CORE_LIB -DNDEBUG -D_MSC_VER=1600 -D_WIN32 -IC:/Qt/qt5/qtbase/mkspecs/win32-msvc2010 -IC:/Qt/qt5/qtpim/src/versit -IC:/Qt/qt5/qtbase/include -IC:/Qt/qt5/qtbase/include/QtVersit -IC:/Qt/qt5/qtbase/include/QtVersit/0.0.0 -IC:/Qt/qt5/qtbase/include/QtVersit/0.0.0/QtVersit -IC:/Qt/qt5/qtpim/src/versit/tmp -IC:/Qt/qt5/qtbase/include/QtContacts -IC:/Qt/qt5/qtbase/include/QtCore qversitreader_p.h -o .moc\release\moc_qversitreader_p.cpp
        C:\Qt\qt5\qtbase\bin\moc.exe -DUNICODE -DWIN32 -DQT_BUILD_VERSIT_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 -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_CONTACTS_LIB -DQT_CORE_LIB -DNDEBUG -D_MSC_VER=1600 -D_WIN32 -IC:/Qt/qt5/qtbase/mkspecs/win32-msvc2010 -IC:/Qt/qt5/qtpim/src/versit -IC:/Qt/qt5/qtbase/include -IC:/Qt/qt5/qtbase/include/QtVersit -IC:/Qt/qt5/qtbase/include/QtVersit/0.0.0 -IC:/Qt/qt5/qtbase/include/QtVersit/0.0.0/QtVersit -IC:/Qt/qt5/qtpim/src/versit/tmp -IC:/Qt/qt5/qtbase/include/QtContacts -IC:/Qt/qt5/qtbase/include/QtCore qversitwriter.h -o .moc\release\moc_qversitwriter.cpp
        C:\Qt\qt5\qtbase\bin\moc.exe -DUNICODE -DWIN32 -DQT_BUILD_VERSIT_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 -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_CONTACTS_LIB -DQT_CORE_LIB -DNDEBUG -D_MSC_VER=1600 -D_WIN32 -IC:/Qt/qt5/qtbase/mkspecs/win32-msvc2010 -IC:/Qt/qt5/qtpim/src/versit -IC:/Qt/qt5/qtbase/include -IC:/Qt/qt5/qtbase/include/QtVersit -IC:/Qt/qt5/qtbase/include/QtVersit/0.0.0 -IC:/Qt/qt5/qtbase/include/QtVersit/0.0.0/QtVersit -IC:/Qt/qt5/qtpim/src/versit/tmp -IC:/Qt/qt5/qtbase/include/QtContacts -IC:/Qt/qt5/qtbase/include/QtCore qversitwriter_p.h -o .moc\release\moc_qversitwriter_p.cpp
        C:\Qt\qt5\qtbase\bin\moc.exe -DUNICODE -DWIN32 -DQT_BUILD_VERSIT_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 -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_CONTACTS_LIB -DQT_CORE_LIB -DNDEBUG -D_MSC_VER=1600 -D_WIN32 -IC:/Qt/qt5/qtbase/mkspecs/win32-msvc2010 -IC:/Qt/qt5/qtpim/src/versit -IC:/Qt/qt5/qtbase/include -IC:/Qt/qt5/qtbase/include/QtVersit -IC:/Qt/qt5/qtbase/include/QtVersit/0.0.0 -IC:/Qt/qt5/qtbase/include/QtVersit/0.0.0/QtVersit -IC:/Qt/qt5/qtpim/src/versit/tmp -IC:/Qt/qt5/qtbase/include/QtContacts -IC:/Qt/qt5/qtbase/include/QtCore qversitcontacthandler.h -o .moc\release\moc_qversitcontacthandler.cpp
        rc -DUNICODE -DWIN32 -DQT_BUILD_VERSIT_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 -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_CONTACTS_LIB -DQT_CORE_LIB -DNDEBUG -fo .obj\release\Qt5Versit_resource.res Qt5Versit_resource.rc
Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl -c -FIQtVersitDepends -YuQtVersitDepends -Fp.pch\release\Qt5Versit_pch.pch -nologo -Zc:wchar_t -arch:SSE2 -O2 -MD -GR -W3 -w34100 -w34189 -w44996 -DUNICODE -DWIN32 -DQT_BUILD_VERSIT_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 -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_CONTACTS_LIB -DQT_CORE_LIB -DNDEBUG -I. -IC:\Qt\qt5\qtbase\include -IC:\Qt\qt5\qtbase\include\QtVersit -IC:\Qt\qt5\qtbase\include\QtVersit\0.0.0 -IC:\Qt\qt5\qtbase\include\QtVersit\0.0.0\QtVersit -Itmp -IC:\Qt\qt5\qtbase\include\QtContacts -IC:\Qt\qt5\qtbase\include\QtCore -I.moc\release -IC:\Qt\qt5\qtbase\mkspecs\win32-msvc2010 -Fo.obj\release\ @C:\Users\Claud\AppData\Local\Temp\nmDE8D.tmp
qversitdocument.cpp
qversitdocument_p.cpp
qversitdocumentwriter_p.cpp
qversitproperty.cpp
qversitreader.cpp
qversitreader_p.cpp
qversitwriter.cpp
qversitwriter_p.cpp
qvcard21writer.cpp
qvcard30writer.cpp
qvcardrestorehandler_p.cpp
.\qvcardrestorehandler_p.cpp(65) : error C2872: '<lambda0>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(65): `anonymous-namespace'::<lambda0>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactrelationship.h(58): QtContacts::`anonymous-namespace'::<lambda0>'
.\qvcardrestorehandler_p.cpp(65) : error C2872: '<lambda0>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(65): `anonymous-namespace'::<lambda0>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactrelationship.h(58): QtContacts::`anonymous-namespace'::<lambda0>'
.\qvcardrestorehandler_p.cpp(66) : error C2872: '<lambda1>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(66): `anonymous-namespace'::<lambda1>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactrelationship.h(59): QtContacts::`anonymous-namespace'::<lambda1>'
.\qvcardrestorehandler_p.cpp(66) : error C2872: '<lambda1>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(66): `anonymous-namespace'::<lambda1>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactrelationship.h(59): QtContacts::`anonymous-namespace'::<lambda1>'
.\qvcardrestorehandler_p.cpp(67) : error C2872: '<lambda2>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(67): `anonymous-namespace'::<lambda2>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactrelationship.h(60): QtContacts::`anonymous-namespace'::<lambda2>'
.\qvcardrestorehandler_p.cpp(67) : error C2872: '<lambda2>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(67): `anonymous-namespace'::<lambda2>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactrelationship.h(60): QtContacts::`anonymous-namespace'::<lambda2>'
.\qvcardrestorehandler_p.cpp(68) : error C2872: '<lambda3>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(68): `anonymous-namespace'::<lambda3>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactrelationship.h(61): QtContacts::`anonymous-namespace'::<lambda3>'
.\qvcardrestorehandler_p.cpp(68) : error C2872: '<lambda3>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(68): `anonymous-namespace'::<lambda3>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactrelationship.h(61): QtContacts::`anonymous-namespace'::<lambda3>'
.\qvcardrestorehandler_p.cpp(69) : error C2872: '<lambda4>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(69): `anonymous-namespace'::<lambda4>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactrelationship.h(62): QtContacts::`anonymous-namespace'::<lambda4>'
.\qvcardrestorehandler_p.cpp(69) : error C2872: '<lambda4>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(69): `anonymous-namespace'::<lambda4>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactrelationship.h(62): QtContacts::`anonymous-namespace'::<lambda4>'
.\qvcardrestorehandler_p.cpp(70) : error C2872: '<lambda5>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(70): `anonymous-namespace'::<lambda5>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactrelationship.h(63): QtContacts::`anonymous-namespace'::<lambda5>'
.\qvcardrestorehandler_p.cpp(70) : error C2872: '<lambda5>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(70): `anonymous-namespace'::<lambda5>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactrelationship.h(63): QtContacts::`anonymous-namespace'::<lambda5>'
.\qvcardrestorehandler_p.cpp(71) : error C2872: '<lambda6>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(71): `anonymous-namespace'::<lambda6>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactmanager.h(77): QtContacts::`anonymous-namespace'::<lambda6>'
.\qvcardrestorehandler_p.cpp(71) : error C2872: '<lambda6>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(71): `anonymous-namespace'::<lambda6>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactmanager.h(77): QtContacts::`anonymous-namespace'::<lambda6>'
.\qvcardrestorehandler_p.cpp(72) : error C2872: '<lambda7>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(72): `anonymous-namespace'::<lambda7>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactmanager.h(78): QtContacts::`anonymous-namespace'::<lambda7>'
.\qvcardrestorehandler_p.cpp(72) : error C2872: '<lambda7>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(72): `anonymous-namespace'::<lambda7>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactmanager.h(78): QtContacts::`anonymous-namespace'::<lambda7>'
.\qvcardrestorehandler_p.cpp(73) : error C2872: '<lambda8>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(73): `anonymous-namespace'::<lambda8>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactmanager.h(79): QtContacts::`anonymous-namespace'::<lambda8>'
.\qvcardrestorehandler_p.cpp(73) : error C2872: '<lambda8>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(73): `anonymous-namespace'::<lambda8>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactmanager.h(79): QtContacts::`anonymous-namespace'::<lambda8>'
.\qvcardrestorehandler_p.cpp(74) : error C2872: '<lambda9>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(74): `anonymous-namespace'::<lambda9>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactmanager.h(80): QtContacts::`anonymous-namespace'::<lambda9>'
.\qvcardrestorehandler_p.cpp(74) : error C2872: '<lambda9>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(74): `anonymous-namespace'::<lambda9>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactmanager.h(80): QtContacts::`anonymous-namespace'::<lambda9>'
.\qvcardrestorehandler_p.cpp(75) : error C2872: '<lambda10>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(75): `anonymous-namespace'::<lambda10>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactaction.h(94): QtContacts::`anonymous-namespace'::<lambda10>'
.\qvcardrestorehandler_p.cpp(75) : error C2872: '<lambda10>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(75): `anonymous-namespace'::<lambda10>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactaction.h(94): QtContacts::`anonymous-namespace'::<lambda10>'
.\qvcardrestorehandler_p.cpp(76) : error C2872: '<lambda11>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(76): `anonymous-namespace'::<lambda11>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactaction.h(95): QtContacts::`anonymous-namespace'::<lambda11>'
.\qvcardrestorehandler_p.cpp(76) : error C2872: '<lambda11>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(76): `anonymous-namespace'::<lambda11>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactaction.h(95): QtContacts::`anonymous-namespace'::<lambda11>'
.\qvcardrestorehandler_p.cpp(77) : error C2872: '<lambda12>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(77): `anonymous-namespace'::<lambda12>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactaction.h(96): QtContacts::`anonymous-namespace'::<lambda12>'
.\qvcardrestorehandler_p.cpp(77) : error C2872: '<lambda12>': simbolo ambiguo
        potrebbe essere '.\qvcardrestorehandler_p.cpp(77): `anonymous-namespace'::<lambda12>'
        o 'c:\qt\qt5\qtbase\include\qtcontacts\../../../qtpim/src/contacts/qcontactaction.h(96): QtContacts::`anonymous-namespace'::<lambda12>'
qversitcontactexporter.cpp
qversitcontactexporter_p.cpp
qversitcontactimporter.cpp
qversitcontactimporter_p.cpp
qversitresourcehandler.cpp
qversitcontacthandler.cpp
qversitcontactpluginloader_p.cpp
qversitutils.cpp
Generazione del codice in corso...
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.EXE"' : codice restituito '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\nmake.EXE"' : codice restituito '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : codice restituito '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : codice restituito '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : codice restituito '0x2'
Stop.

有人可以温柔地帮助我吗?我完全不知道!

我理解C2872的含义,但我真的不相信编译一个知名的库作为Qt抛出它,尽管如此,我对如何在这种特定情况下最终修复此错误有任何线索。

0 个答案:

没有答案