Skip to main content
GameDev.net gamedev.net
🔒 Locked

VC++ and XP ?

Started by meZmo Jan 16, 2002 at 7:39 PM 31 replies 750+ views
Original Post
meZmo
meZmo
I get this error when I try to build my projects (F7): "''DRIVE:\PATH\FILE'' Cannot save file. The file may be in use by another application." This happens every other time I build, and always on the active file in VS. I''ve never experienced similar problems in W98 or W2K. I''m running VC++ ver.6 Enterprise SP5. Any suggestions appreciated! -meZ
WayfarerX
WayfarerX
Actually, yes. This just started happening to me. I have no idea why.

"So crucify the ego, before it's far too late. To leave behind this place so negative and blind and cynical, and you will come to find that we are all one mind. Capable of all that's imagined and all conceivable."
- Tool
------------------------------


Edited by - wayfarerx on January 16, 2002 9:33:41 PM
"There is no reason good should not triumph at least as often as evil. The triumph of anything is a matter of organization. If there are such things as angels, I hope that they're organized along the lines of the mafia." -Kurt Vonnegut
CGameProgrammer
CGameProgrammer
I have VC++ 6.0 Standard and this happens all the time. It doesn''t matter how much time I wait after the last change to the file before saving it -- usually, it still gives me that error, and only once. After getting the error, the next time I save always works. It is definitely annoying and I would certainly like to know what is causing it. It''s possible the OS does some sort of automatic document-saving thing to allow you to restore documents you couldn''t save before the computer crashed or whatever.

~CGameProgrammer( );

~CGameProgrammer( ); Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
jenova
jenova
this happen''d to me, but it also happened in Win2K. i have re-installed XP and it hasn''t happened since.

To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
Fruny
Fruny
I''m only using Win2k, so this probably won''t help you, but then again, maybe.

The only file locking problem I''ve noticed during a build is when the executable was (or had recently been) running and the linker tried to save a new one over it.

Is it a problem with your source files, or the linker output ?
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
WayfarerX
WayfarerX
Source files.

"So crucify the ego, before it''s far too late. To leave behind this place so negative and blind and cynical, and you will come to find that we are all one mind. Capable of all that''s imagined and all conceivable."
- Tool
------------------------------
"There is no reason good should not triumph at least as often as evil. The triumph of anything is a matter of organization. If there are such things as angels, I hope that they're organized along the lines of the mafia." -Kurt Vonnegut
CGameProgrammer
CGameProgrammer
I''m guessing you''d have to disable something in Control Panel -> Administrative Tools -> Services. But I''m not sure. Hopefully there is some way to solve this problem.

~CGameProgrammer( );

~CGameProgrammer( ); Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
Anthracks
Anthracks
I''ve had the problem too from time to time, but rebooting always seems to fix it.

Fruny, if they are having the same problem I am, it is with the source, not the linker output. I know that if you run your code from within MSVC and it doesn''t terminate properly, the next time you go to compile it will say something about the linker being unable to write the .exe file, since it''s still running in the background. But this is a different issue; like meZmo said, basically every other time you go to save the source file a dialog box pops up with that message. It''s really weird, and even more annoying.

Anthracks
Martee
Martee
Well that''s just strange. I''ve been using XP for nearly a year, and I''ve never experienced anything like this.
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
Fruny
Fruny
Ok. Can''t help you then. Good luck. ( But then again you''ve been using WinXP, so you accumulated lots''o'' bad karma )
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
MiNDHiVE
MiNDHiVE
Are you programming a Win32 application???

I used to call PostQuitMessage on the WM_DESTROY message... but in XP my apps stayed in the message loop and had to be terminated manually (thus stopping me from rebuilding the app).

Call PostQuitMessage on WM_CLOSE and all will be fine.
http://www.deakin.edu.au/~bradleyj/unsanity/
CGameProgrammer
CGameProgrammer
This has nothing to do with programming, MindHive. When using Visual C++, and you save a file (by clicking "Save" or pressing Ctrl+S, or simply compiling the program which saves automatically), half the time this makes an error saying you cannot save the file because it''s in use by another application.

~CGameProgrammer( );

~CGameProgrammer( ); Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
CGameProgrammer
CGameProgrammer
And this isn''t dealing with the final executable that the linker creates, or the intermediate files (the .obj files, etc.), or anything like that. Just the files you create and edit.

~CGameProgrammer( );

~CGameProgrammer( ); Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
craymail
craymail
I have been experiencing this problem for years whether it be with Win98SE, Win2K or WinXP (I have had it happen with all 3).

I honestly have no idea what is causing it and how to fix it, but I guess it is just one of those little things that I, and the rest of us, will have to live with. It _always_ works the second time for me.

Cray
CrayLead Programmer, MTA (http://www.mtavc.com)cray@multitheftauto.com
CGameProgrammer
CGameProgrammer
It didn''t happen when I used Windows 98, then I got WinXP and it happens. It always works the second time, but it should work every time. It''s annoying having to save, click ''OK'', then save again.

~CGameProgrammer( );

~CGameProgrammer( ); Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
WayfarerX
WayfarerX
I''ve used VC++ on Win NT 4 Workstation & Server with no prob, Win 2000 Pro & Server with no prob. The only time this has happened to me is on Win XP Home.

"So crucify the ego, before it''s far too late. To leave behind this place so negative and blind and cynical, and you will come to find that we are all one mind. Capable of all that''s imagined and all conceivable."
- Tool
------------------------------
"There is no reason good should not triumph at least as often as evil. The triumph of anything is a matter of organization. If there are such things as angels, I hope that they're organized along the lines of the mafia." -Kurt Vonnegut
Promit
Promit
quote:
Original post by Martee
Well that''s just strange. I''ve been using XP for nearly a year, and I''ve never experienced anything like this.


uhhhhmmm...its only been out a couple months.

And i never experienced this problem myself. I bought XP they day after it came out and installed VC the same day. It *might* be a security setting.

-----------------------------
The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
jenova
jenova
a security setting.... that''s funny. especially, after every post has said that immediately after they press the save button again it works.

To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
WayfarerX
WayfarerX
quote:
Original post by Promit
uhhhhmmm...its only been out a couple months.



The betas have been in MSDN for quite awhile now.



"So crucify the ego, before it''s far too late. To leave behind this place so negative and blind and cynical, and you will come to find that we are all one mind. Capable of all that''s imagined and all conceivable."
- Tool
------------------------------
"There is no reason good should not triumph at least as often as evil. The triumph of anything is a matter of organization. If there are such things as angels, I hope that they're organized along the lines of the mafia." -Kurt Vonnegut
meZmo
meZmo
It's good to get confirmed that this is an actual problem. Now if we could only find out why... I'm lost at this one..


Edited by - meZmo on January 17, 2002 2:51:28 PM

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.