C question (may be dumb one)

jdeman

Active Member
Hi List,
Sorry if this question does not apply to this board but would really appreciate your help.
I am somewhat new to C and have (may be ) a very dumb question.
I am using Borland C++ 3.1 compiler back from early 90's. Any EXE that I generate from this cannot be deleted/renamed/moved from the Windows Explorer. It gives me an error "The file is shared by other process or sourse or destination is in use". I made sure no process is running on my machine and even rebooted and tried deleting. I however can delete it from DOS command line ONLY after closing Windows explorer.Is this normal ??

Pl. advise.
Thanks as always
jdeman
(I am on WIN2K)
 
Not such a dumb question, just a little off-topic!

It probably has not terminated cleanly. Windows does not allow you to delete a program that it believes is still running.

Does your program dynamic load any DLLs but not release them? Or load DLLs that have long running code in their disconnect event?

Cheers,
JohnO
 
Jolly,
I am not using any DLL. Just for testing I just tried creating "Hello.c"(just prints hello on the screen) and generated an EXE. Immediately after generating the EXE I tried deleting it (without even running it) and it does not allow me to do so.

Any suggestions ??
Thanks
jdeman
 
Not sure about your compiler/ide setup, but i assume that the compiler or ide has been exited?

Basically, some process has the exe file open, and that is why windows won't delete it. If you reboot windows can you then delete it?
 
Here's my advice. I would dump the compiler. If it's from the early 90's then more than likely it's a 16-bit compiler which won't allow you to easily connect to anything in windows anymore. C++ development tools have come along ways in the last ten years. You are better off getting a new C++ tool. If you like broland or will be creating user interface C++ builder is a great tool. If you're only building engine code VC++ would be better.
|
 
Back
Top