1

因此,我已经寻找了将近 2 天的时间来解决我的问题,但是收到此错误的其他所有人似乎都在链接 dll 而不是 lib。但是,对我来说似乎并非如此,所以我在这里。

我正在尝试使用 vc110 (VS2012) 工具链在 Visual Studio 2012 中构建一个项目。但是,每当我构建项目时,都会从构建日志中收到以下链接器错误(详细的详细信息):

1>Task "Link"
1>  Environment Variables passed to tool:
1>    VS_UNICODE_OUTPUT=1344
1>  C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64\link.exe /ERRORREPORT:PROMPT /OUT:"..\..\..\..\..\..\twk_results_win/ViewLocal/x64/MC_out/Debug\EditorServiceMgr.exe" /INCREMENTAL /NOLOGO /LIBPATH:S:\twk_amf\Implementation\EditorServiceMgr\proj\Win\vc9\..\..\..\..\..\..\twk_results_win/ViewLocal/x64/MC_inter/EditorServiceMgr/Debug\..\..\..\..\..\..\external\Trolltech_Qt4\lib\win\x64\Debug msvcrtd.lib QtCored4.lib QtGuid4.lib QtXmld4.lib QtNetworkd4.lib QtUiToolsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /NODEFAULTLIB /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcp.lib /NODEFAULTLIB:libcpd.lib /NODEFAULTLIB:libci.lib /NODEFAULTLIB:libcid.lib /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:libcpmt.lib /NODEFAULTLIB:libcpmtd.lib /NODEFAULTLIB:libcimt.lib /NODEFAULTLIB:libcimtd.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"..\..\..\..\..\..\twk_results_win/ViewLocal/x64/MC_out/Debug\EditorServiceMgr.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"..\..\..\..\..\..\twk_results_win/ViewLocal/x64/MC_out/Debug\EditorServiceMgr.lib" /MACHINE:X64 ..\..\..\..\..\..\twk_results_win/ViewLocal/x64/MC_inter/EditorServiceMgr/Debug\EditorServiceMgrSvc.h
1>  ..\..\..\..\..\..\twk_results_win/ViewLocal/x64/MC_inter/EditorServiceMgr/Debug\EditorServiceMgrSvc.rc
1>  ..\..\..\..\..\..\twk_results_win/ViewLocal/x64/MC_inter/EditorServiceMgr/Debug\EditorServiceMgrSvc.res
1>  ..\..\..\..\..\..\twk_results_win/ViewLocal/x64/MC_out/Debug\EditorServiceMgrSvc.dll
1>  ..\..\..\..\..\..\twk_results_win/ViewLocal/x64/MC_inter/EditorServiceMgr/Debug\EditorServiceMgr.res
1>  ..\..\..\..\..\..\twk_results_win/ViewLocal/x64/MC_inter/EditorServiceMgr/Debug\EditorServiceMgrSvc.obj
1>  Tracking command:
1>  C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\Tracker.exe /a /d C:\Windows\Microsoft.NET\Framework\v4.0.30319\FileTracker.dll /i S:\twk_results_win\ViewLocal\x64\MC_inter\EditorServiceMgr\Debug /r "S:\TWK_RESULTS_WIN\VIEWLOCAL\X64\MC_INTER\EDITORSERVICEMGR\DEBUG\EDITORSERVICEMGR.RES|S:\TWK_RESULTS_WIN\VIEWLOCAL\X64\MC_INTER\EDITORSERVICEMGR\DEBUG\EDITORSERVICEMGRSVC.H|S:\TWK_RESULTS_WIN\VIEWLOCAL\X64\MC_INTER\EDITORSERVICEMGR\DEBUG\EDITORSERVICEMGRSVC.OBJ|S:\TWK_RESULTS_WIN\VIEWLOCAL\X64\MC_INTER\EDITORSERVICEMGR\DEBUG\EDITORSERVICEMGRSVC.RC|S:\TWK_RESULTS_WIN\VIEWLOCAL\X64\MC_INTER\EDITORSERVICEMGR\DEBUG\EDITORSERVICEMGRSVC.RES|S:\TWK_RESULTS_WIN\VIEWLOCAL\X64\MC_OUT\DEBUG\EDITORSERVICEMGRSVC.DLL" /b MSBuildConsole_CancelEvent31ad2214810446c299127f83382c747d  /c "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64\link.exe"  /ERRORREPORT:PROMPT /OUT:"..\..\..\..\..\..\twk_results_win/ViewLocal/x64/MC_out/Debug\EditorServiceMgr.exe" /INCREMENTAL /NOLOGO /LIBPATH:S:\twk_amf\Implementation\EditorServiceMgr\proj\Win\vc9\..\..\..\..\..\..\twk_results_win/ViewLocal/x64/MC_inter/EditorServiceMgr/Debug\..\..\..\..\..\..\external\Trolltech_Qt4\lib\win\x64\Debug msvcrtd.lib QtCored4.lib QtGuid4.lib QtXmld4.lib QtNetworkd4.lib QtUiToolsd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /NODEFAULTLIB /NODEFAULTLIB:libc.lib /NODEFAULTLIB:libcd.lib /NODEFAULTLIB:libcp.lib /NODEFAULTLIB:libcpd.lib /NODEFAULTLIB:libci.lib /NODEFAULTLIB:libcid.lib /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:libcpmt.lib /NODEFAULTLIB:libcpmtd.lib /NODEFAULTLIB:libcimt.lib /NODEFAULTLIB:libcimtd.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"..\..\..\..\..\..\twk_results_win/ViewLocal/x64/MC_out/Debug\EditorServiceMgr.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"..\..\..\..\..\..\twk_results_win/ViewLocal/x64/MC_out/Debug\EditorServiceMgr.lib" /MACHINE:X64 ..\..\..\..\..\..\twk_results_win/ViewLocal/x64/MC_inter/EditorServiceMgr/Debug\EditorServiceMgrSvc.h
1>  ..\..\..\..\..\..\twk_results_win/ViewLocal/x64/MC_inter/EditorServiceMgr/Debug\EditorServiceMgrSvc.rc
1>  ..\..\..\..\..\..\twk_results_win/ViewLocal/x64/MC_inter/EditorServiceMgr/Debug\EditorServiceMgrSvc.res
1>  ..\..\..\..\..\..\twk_results_win/ViewLocal/x64/MC_out/Debug\EditorServiceMgrSvc.dll
1>  ..\..\..\..\..\..\twk_results_win/ViewLocal/x64/MC_inter/EditorServiceMgr/Debug\EditorServiceMgr.res
1>  ..\..\..\..\..\..\twk_results_win/ViewLocal/x64/MC_inter/EditorServiceMgr/Debug\EditorServiceMgrSvc.obj
1>..\..\..\..\..\..\twk_results_win/ViewLocal/x64/MC_inter/EditorServiceMgr/Debug\EditorServiceMgrSvc.h : fatal error LNK1107: invalid or corrupt file: cannot read at 0x5F2
1>  The command exited with code 1107.
1>Done executing task "Link" -- FAILED.

从构建输出中,我认为链接器可能正在尝试链接头文件,但我无法找到任何证据。

此处引用的文件EditorServiceMgrSvc.h,仅包含宏定义,不包含。rc 文件中也引用了头文件,并作为符号头文件包含在内。此外,项目属性页的附加依赖项中只有库。

如果需要,除了构建输出之外,我还会提供我可以提供的内容,但由于我正在处理专有代码,因此我可能无法提供那么多内容。对这里发生的事情有任何想法吗?

编辑:
请注意,此项目是从 Visual Studio 2008 项目格式自动转换的。

4

0 回答 0