构建C ++互操作项目时出现随机生成错误 [英] Random build error on building C++ interop project

查看:66
本文介绍了构建C ++互操作项目时出现随机生成错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

我有一个C ++互操作项目,该项目可以在开发人员的计算机上很好地构建,但是一旦出现蓝月亮,它就会在我们的构建计算机上引发Linking错误(见下文).我已经附加了部分构建报告和项目链接属性.当我在一个蓝色的月亮中说一次时,我的意思是说每月1个,我们每天都会建立.

只是想看看是否这里的任何人都曾经经历过.任何提示将不胜感激.

错误.


3> LINK:致命错误LNK1104:无法打开文件'.\ bin \ Debug \ SEN.Framework.Common.Interop.dll'


生成"报告的一部分.

创建命令行"cl.exe @" d:\ build_views \ build_v8r0_int \ hppc_src \ GUIs.Net \ Application Framework \ Framework.Common.Interop \ bin \ Debug \ RSP000004155844524.rsp" /nologo/errorReport:queue"
创建临时文件"d:\ build_views \ build_v8r0_int \ hppc_src \ GUIs.Net \ Application Framework \ Framework.Common.Interop \ bin \ Debug \ RSP00000A155844524.rsp"带有内容
[
/OUT:".\bin\Debug\SEN.Framework.Common.Interop.dll" /INCREMENTAL/LIBPATH:"D:\ build_views \ build_v8r0_int \ hppc_src \ Servers \ Framework \ src \ frame \ Debug" /LIBPATH:"D:\ build_views \ build_v8r0_int \ hppc_src \ Servers \ Generic \ src \ Debug" /DLL/MANIFEST/MANIFESTFILE:.\bin\Debug\SEN.Framework.Common.Interop.dll.intermediate.manifest" /MANIFESTUAC:" level ='asInvoker'uiAccess ='false'" /DEBUG/ASSEMBLYDEBUG/PDB:d:\build_views\build_v8r0_int\hppc_src\GUIs.Net\Application Framework \ Framework.Common.Interop \ bin \ Debug \ SEN.Framework.Common.Interop.pdb" /DYNAMICBASE/FIXED:否/NXCOMPAT/MACHINE:X86  /expectedoutputsize:75000000 fwork.lib tgeneric.lib

...

创建命令行"link.exe @" d:\ build_views \ build_v8r0_int \ hppc_src \ GUIs .Net \ Application Framework \ Framework.Common.Interop \ bin \ Debug \ RSP00000A155844524.rsp". /NOLOGO/ERRORREPORT:QUEUE"
创建临时文件"d:\ build_views \ build_v8r0_int \ hppc_src \ GUIs.Net \ Application Framework \ Framework.Common.Interop \ bin \ Debug \ RSP00000B155844524.rsp"带有内容

...


项目属性.

/OUT:.\bin\Debug\SEN.Framework.Common.Interop.dll"
/INCREMENTAL
/NOLOGO
/DLL
/MANIFEST
/MANIFESTFILE:".\bin\Debug\SEN.Framework.Common.Interop.dll.intermediate .manifest"
/MANIFESTUAC:"level ='asInvoker'uiAccess ='false'"
/DEBUG
/ASSEMBLYDEBUG
/PDB:d:\Views\ttang_v8r0_dev_2\hppc_src\GUIs.Net\Application Framework \ Framework.Common.Interop \ bin \ Debug \ SEN.Framework .Common.Interop.pdb"
/DYNAMICBASE
/已修复:否
/NXCOMPAT
/MACHINE:X86
/ERRORREPORT:PROMPT fwork.lib tgeneric.lib 
/expectedoutputsize:75000000

Hi!

I have C++ interop project which builds fine on developer's machine but once in a blue moon, it kicks a Linking error (see below) on our build machine.  I have attached part of the build report and project link properties.  When I say once in a blue moon, I mean about say 1/month and we build everyday.

Just wanted to see if anybody here experience this before.  Any hints would be appreciated.

Error.


3>LINK : fatal error LNK1104: cannot open file '.\bin\Debug\SEN.Framework.Common.Interop.dll'


Part of Build report.

Creating command line "cl.exe @"d:\build_views\build_v8r0_int\hppc_src\GUIs.Net\Application Framework\Framework.Common.Interop\bin\Debug\RSP000004155844524.rsp" /nologo /errorReport:queue"
Creating temporary file "d:\build_views\build_v8r0_int\hppc_src\GUIs.Net\Application Framework\Framework.Common.Interop\bin\Debug\RSP00000A155844524.rsp" with contents
[
/OUT:".\bin\Debug\SEN.Framework.Common.Interop.dll" /INCREMENTAL /LIBPATH:"D:\build_views\build_v8r0_int\hppc_src\Servers\Framework\src\frame\Debug" /LIBPATH:"D:\build_views\build_v8r0_int\hppc_src\Servers\Generic\src\Debug" /DLL /MANIFEST /MANIFESTFILE:".\bin\Debug\SEN.Framework.Common.Interop.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /ASSEMBLYDEBUG /PDB:"d:\build_views\build_v8r0_int\hppc_src\GUIs.Net\Application Framework\Framework.Common.Interop\bin\Debug\SEN.Framework.Common.Interop.pdb" /DYNAMICBASE /FIXED:No /NXCOMPAT /MACHINE:X86  /expectedoutputsize:75000000 fwork.lib tgeneric.lib

...

Creating command line "link.exe @"d:\build_views\build_v8r0_int\hppc_src\GUIs.Net\Application Framework\Framework.Common.Interop\bin\Debug\RSP00000A155844524.rsp" /NOLOGO /ERRORREPORT:QUEUE"
Creating temporary file "d:\build_views\build_v8r0_int\hppc_src\GUIs.Net\Application Framework\Framework.Common.Interop\bin\Debug\RSP00000B155844524.rsp" with contents

...


Project properties.

/OUT:".\bin\Debug\SEN.Framework.Common.Interop.dll"
/INCREMENTAL
/NOLOGO
/DLL
/MANIFEST
/MANIFESTFILE:".\bin\Debug\SEN.Framework.Common.Interop.dll.intermediate.manifest"
/MANIFESTUAC:"level='asInvoker' uiAccess='false'"
/DEBUG
/ASSEMBLYDEBUG
/PDB:"d:\Views\ttang_v8r0_dev_2\hppc_src\GUIs.Net\Application Framework\Framework.Common.Interop\bin\Debug\SEN.Framework.Common.Interop.pdb"
/DYNAMICBASE
/FIXED:No
/NXCOMPAT
/MACHINE:X86
/ERRORREPORT:PROMPT fwork.lib tgeneric.lib 
/expectedoutputsize:75000000

推荐答案

这看起来完全像文件系统问题.也就是说,Link由于文件已锁定而无法打开文件.

您是否在盒子上运行防病毒软件?很多时候读取或写入文件时,扫描仪都会立即连接以扫描文件.我们已经在实验室中看到了这一点.许多扫描仪为用户提供了关闭对某些文件夹的扫描的功能.

其他常见问题是将具有通用依赖项的多个项目构建到通用输出目录中.在这种情况下,构建中的多个程序会同时复制或访问多个文件.

您可以尝试使用诸如Process Monitor或Process Explorer之类的东西(来自
This looks purely like a file system problem. That is, Link can't open the file because it is locked.

Do you have anti-virus running on the box? Many times when files are read or written, the scanner will immediatly attach to scan the file. We have seen this in our labs. Many scanners offer the ability for the user to turn off scanning for certain folders.

Other common issues have been building multiple projects with common dependencies into a common output directory. In this case, multiple files are being copied or accessed simultaneously by multiple programs in the build.

You can try using something like Process Monitor or Process Explorer (from SysInternals) to determine what is locking the file at the time link fails.

Chuck England
Visual Studio Platform
Program Manager - MSBuild


这篇关于构建C ++互操作项目时出现随机生成错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆