由于链接器错误,为win32-msvc编译Qt 5.2.1失败

时间:2014-03-20 16:53:11

标签: c++ qt compilation linker-errors

我试图在64位Win7机器上编译Qt 5.2.1(我想要32位二进制文​​件)。

我配置了

configure -debug-and-release -opensource -platform win32-msvc2012 -opengl desktop -nomake examples -nomake tests

我确实通过运行

设置了编译器路径
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\vcvars32.bat

它会编译一段时间但在链接时会失败。

这是错误输出:

link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /DLL /OUT:..\..\..\..\plugins\platforms\qwindowsd.dll @C:\Users\steffenh\AppData\Local\Temp\nm9509.tmp
   Creating library ..\..\..\..\plugins\platforms\qwindowsd.lib and object ..\..\..\..\plugins\platforms\qwindowsd.exp
dlldata.obj : error LNK2001: unresolved external symbol _Accessible2_ProxyFileInfo
dlldata.obj : error LNK2001: unresolved external symbol _AccessibleAction_ProxyFileInfo
dlldata.obj : error LNK2001: unresolved external symbol _AccessibleApplication_ProxyFileInfo
dlldata.obj : error LNK2001: unresolved external symbol _AccessibleComponent_ProxyFileInfo
dlldata.obj : error LNK2001: unresolved external symbol _AccessibleEditableText_ProxyFileInfo
dlldata.obj : error LNK2001: unresolved external symbol _AccessibleHyperlink_ProxyFileInfo
dlldata.obj : error LNK2001: unresolved external symbol _AccessibleHypertext_ProxyFileInfo
dlldata.obj : error LNK2001: unresolved external symbol _AccessibleImage_ProxyFileInfo
dlldata.obj : error LNK2001: unresolved external symbol _AccessibleRelation_ProxyFileInfo
dlldata.obj : error LNK2001: unresolved external symbol _AccessibleTable_ProxyFileInfo
dlldata.obj : error LNK2001: unresolved external symbol _AccessibleTable2_ProxyFileInfo
dlldata.obj : error LNK2001: unresolved external symbol _AccessibleTableCell_ProxyFileInfo
dlldata.obj : error LNK2001: unresolved external symbol _AccessibleText_ProxyFileInfo
dlldata.obj : error LNK2001: unresolved external symbol _AccessibleValue_ProxyFileInfo
..\..\..\..\plugins\platforms\qwindowsd.dll : fatal error LNK1120: 14 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\link.EXE"' : return code '0x460'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\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.
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.

有谁可以帮助我?

最好的, S.H


更新

似乎Qt尝试链接Microsoft Active Accessibility,其主文件是" oleacc.dll",位于系统路径中。

如何检查这是32位还是64位?

1 个答案:

答案 0 :(得分:0)

当我通过

添加VERBOSE链接器标志时,链接工作正常

“QMAKE_LFLAGS + = / VERBOSE”改为“mkspecs / qconfig.pri”

(这不应该改变任何东西,但它有效)。

Qt Bug说明在这里:https://bugreports.qt-project.org/si/jira.issueviews:issue-html/QTBUG-37910/QTBUG-37910.html