views:

527

answers:

3

I find increasingly now when I am building a large project, I get the following error.

fatal error C1083: Cannot open compiler intermediate file: 'C:\Temp\SYS\a03132ex': Permission denied

It occurs in Visual Studio 2003 and VC6, and I have investigated the potential MSDN reasons and drawn a blank. There is plenty of space on the hard disk, and not that many other programs open that I should be running out of handles. Any ideas, or is it time to re-install windows again. I'm running XP SP3 by the way, and have two large NTFS hard disks with very many files.

Edit: the name of the temp file changes, and I have cleared out the entire c:\temp folder.

+1  A: 

I seem to remember from somewhere deep down memory lane that deleting the temporary files created by visual studio for the project fixes this issue (until it pops up again).

The temporary files have the same name as your project. (There may also be something VC/VS related in your home directory if that does not help.)

krosenvold
I *know* there are some files under Documents And Settings\Application Data somewhere that you may want to zap.
krosenvold
+1  A: 

And if that doesn't help, check if your TMP environment setting doesn't end with a semicolon for example. It should be a fully qualified path as well, not relative.

Edit: I found a topic on the internet about it and there it is said that if you attempt to include a directory instead of a file you can trigger that very same error.

I assume you already verified this, but does the actual C:\Temp\SYS folder have the correct permissions (ie allow all users to read/write files in it)?

Blizz
+1  A: 

You could also check the rights associated with c:\temp and c:\temp\sys (if sys does exist outside the compilation session)

cacls c:\temp

Also, (as suggested here), try setting the compiler flag -Bd under advanced options and inspect the arguments into the compiler. Maybe you meant to specify a path and end up compiling a non-existant file ?

VonC