VS2010 LNK1104 无法打开.map

现象:

每次选择 重新生成,就会出现上述错误。

然后选择 生成,正常生成。

 

解决:改成否就可以了

 

 

原因:

https://social.msdn.microsoft.com/Forums/en-US/19804537-05ba-4adf-8273-68d2450401e0/build-failes-if-map-file-should-be-generated?forum=vcprerelease

 

What I'm seeing is that, when the map file doesn't exist, the link fails with that exact error message, and a zero-byte map file is created.  That zero-byte map file will prevent the error on the next build, but it doesn't help for the next rebuild since the map file is deleted.

 

I've also discovered that incremental linking has to be enabled for this to occur.

 

The original report doesn't say the link fails "when a map file exists in the folder", it just says "in the obj32-Folder there is a map file of 0 size."  It doesn't say whether that's before or after the failed link.

 

The machine I'm testing this on doesn't have any real-time AV scanning.

 

Here is the link command lnie, according the Linker->Command Line property page.

 

/OUT:"..\WinDebug\Module.dll" /INCREMENTAL /NOLOGO /LIBPATH:"..\WinDebug\Lib" /DLL "msxml2.lib" "version.lib" /MANIFEST /ManifestFile:"./WinDebug\Module.dll.intermediate.manifest" /ALLOWISOLATION /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"..\WinDebug\PDB\Module.pdb" /MAP":..\WinDebug\ASM\Module\Module.map" /MAPINFO:EXPORTS /SUBSYSTEM:WINDOWS /PGD:"C:\Projects\vs2010\WinDebug\Module.pgd" /TLBID:1 /DYNAMICBASE:NO /IMPLIB:"..\WinDebug\LIB\Module.lib" /MACHINE:X86 /ERRORREPORT:QUEUE 

 

Also, the output window shows the "creating library" line twice when this happens.  And in Process Monitor, I can see there are three PIDs involved for LINK.EXE (and I'm only building one project).  It seems like, at one point, two different instances of LINK.EXE are launched that both try to open the map file.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值