Cannot open "TEMPFILE"

P

paoloricardo

I'm using the MS Linker to compile a program. The LINK fails with error LNK1104. I have set TMP and TEMP environment variables (I'm running this in anXP command window). Of the standard causes of this I'm not out of space (approx 45GBs free on my disk) and I log into XP as Administrator which, I assume, gives me Admin rights when I open a command window.

Can anyone help please? Screen shot below:

-------
Microsoft (R) Incremental Linker Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

ctoydb.obj
cbllds0000061C.obj
LINK : fatal error LNK1104: cannot open file "TEMPFILE"
 
P

Paul

I'm using the MS Linker to compile a program. The LINK fails with error LNK1104. I have set TMP and TEMP environment variables (I'm running this in an XP command window). Of the standard causes of this I'm not out of space (approx 45GBs free on my disk) and I log into XP as Administrator which, I assume, gives me Admin rights when I open a command window.

Can anyone help please? Screen shot below:

-------
Microsoft (R) Incremental Linker Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

ctoydb.obj
cbllds0000061C.obj
LINK : fatal error LNK1104: cannot open file "TEMPFILE"

"Linker Tools Error LNK1104"

http://msdn.microsoft.com/en-us/library/ts7eyw4s(v=VS.71).aspx

"...

Another program may have the file open and
the linker cannot write to it.
"

You can use Process Monitor, set a filter just for the
Linker program, and log what files it attempts to access.
Maybe you can figure out the problem that way. Using filters
with this program, is to control the amount of logged data.

http://technet.microsoft.com/en-us/sysinternals/bb896645

It's possible the Handle program, might give you some
information on files as well.

http://technet.microsoft.com/en-us/sysinternals/bb896655

Just a guess,
Paul
 
P

paoloricardo

Paul: thanks. It appears that I had \tmp and \temp variables defined twice - once in the XP command window and again in a batch file I was running to set up the linker. Eliminating the latter cured the problem.
 
D

David H. Lipman

From: said:
Paul: thanks. It appears that I had \tmp and \temp variables defined twice - once in the
XP
command window and again in a batch file I was running to set up the linker. Eliminating
the latter cured the problem.

The variables are...

%TMP% and %TEMP%

The usually point to the same location and are set within the OS and all daughter
processes inherit their setting.

If an environmental variable is set in a program or DOS BAT or CMD files then all
subsequent daughter processes spawned from that will use that setting but not parallel or
parent processes. Environmental variables are inherited down the chain, not up.

Variables are set by; Right-Click on "My Computer" --> properties --> settings -->
environment variables

User variables for <end_user> -- Environmental variables set for this logged on user and
only for this user
System variables -- Environmental variables set globally for all users of the computer
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top