严重错误LNK1104:无法打开LNKn.tmp [英] fatal error lnk1104: can't open LNKn.tmp

查看:204
本文介绍了严重错误LNK1104:无法打开LNKn.tmp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用Bamboo的Visual-Studio任务构建MSVC2010项目时,出现以下错误:

When I'm trying to build my MSVC2010 project with Bamboo's Visual-Studio task, I get the following error:

LINK : fatal error LNK1181: File "C:\Windows\system32\config\systemprofile\AppData\Local\Temp\lnk7A64.tmp" could not be opened.

msdn 将此设置为说:

如果给定文件名为LNKn,这是链接器为临时文件生成的文件名,则TMP环境变量中指定的目录可能不存在,或者为TMP环境变量指定了多个目录. (仅应为TMP环境变量指定一个目录路径.)

If the given file is named LNKn, which is a filename generated by the linker for a temporary file, the directory specified in the TMP environment variable may not exist, or more than one directory is specified for the TMP environment variable. (Only one directory path should be specified for the TMP environment variable.)

所以我检查了我的TMP变量,它只有一个目录,这个目录确实存在. 实际上甚至生成了一个文件,但不是正确的文件. 因此,例如,我开始构建,创建了lnk7A64.tmp,但是链接程序查找lnk7A64.tmp

So I checked my TMP variable and it has only one directory, which does exist. Actually there is even a file generated, just not the right one. So for example, I start the build, lnk7A64.tmp is created, but the linker looks for lnk7A64.tmp

我只有Bamboo遇到此错误.它可以在Visual Studio中正常工作.
关于发生这种情况以及如何解决的任何想法?

I only get this error with Bamboo. It works fine with Visual Studio.
Any ideas as to why that happens and how to resolve it?

更新:

我开始认为可能是这样,因为Bamboo无法找到创建正确文件所需的可执行文件(可能是资源编译器).我已经在此处进行了描述.我以为可以解决该问题,但似乎也引起了该错误.

I'm beginning to think this may be, because Bamboo can't find the executables needed for creating the right files (ressource compiler maybe). I've described this here before. I thought I could work around that problem, but it seems like it's causing this error too.

推荐答案

我遇到了同样的问题(这使我想到了您的问题!).我发现默认情况下,竹代理服务以"SYSTEM"运行,这与我的构建不兼容.请遵循Atlassian的本指南来更改您的竹代理运行的用户.我做到了,现在就可以了. https://confluence.atlassian .com/display/BAMBOO/Running + Bamboo + service + on + Windows + as + the + local + user

I had the same issue (which brought me to your question!). I figured out that by default, the bamboo agent service runs as "SYSTEM" and this did not jive with my build. Follow this guide from Atlassian to change the user that your bamboo agent runs as. I did this and it works now. https://confluence.atlassian.com/display/BAMBOO/Running+Bamboo+service+on+Windows+as+the+local+user

这篇关于严重错误LNK1104:无法打开LNKn.tmp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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