Hi, I'm new so if this is the wrong place please let me know.
I am taking an Assembly class and often when I go to build one of my programs on my home PC (running Server 2008) I get an 'LNK1104 cannot open file myproj.exe' error for a couple of minutes. If I wait a few minutes and try it again, the linking goes OK. I have tried to figure out some rhyme or reason to the problem, but there doesn't seem to be any. It is as if the file gets locked for a few mminutes, then unlocked. I've searched the forum (and elsewhere) and found reference to LNK1104 errors, but those seemed to involve libraries and so on.
It may be an access rights problem. One cause might be that assembler produces small executables that make some antivirus software choke. Try suspending the AV, or exempting the folder where you create the exe from scanning.
Also, check the task manager to make sure your program exits correctly. If you have some sort of error that makes your process stay running for some time after the window is gone, link will be unable to overwrite the file.
-r
Quote from: redskull
Also, check the task manager to make sure your program exits correctly. If you have some sort of error that makes your process stay running for some time after the window is gone, link will be unable to overwrite the file.
Or if you still have it running/open because you didn't exit/close it, done that a bunch of times.
Other fun will occur if the file is on a different server, and the times are out-of-sync, but that's more of a MAKE issue, than a LINK one.
Quote from: Quinn1000 on October 18, 2010, 08:16:58 PM
I get an 'LNK1104 cannot open file myproj.exe' error for a couple of minutes. If I wait a few minutes and try it again, the linking goes OK. I have tried to figure out some rhyme or reason to the problem, but there doesn't seem to be any. It is as if the file gets locked for a few mminutes, then unlocked. I've searched the forum (and elsewhere) and found reference to LNK1104 errors, but those seemed to involve libraries and so on.
Check for running of "mspdbsrv.exe" process. If it is runned, terminate it, and try to link immediately after termination of "mspdbsrv.exe". Probably this is not reason, but try this.
Alex
Similar to what jj2007 said, I created a new location for my asm projects outside of the default VS Project location (which is in the Libraries/Documents folder). So far so good but my program hasn't thrown an exception yet.
Update: Moving the project out of the default location seems to be working! Thanks for the help!
Update: Still happening after all. Killed mspdbsrv.exe but that did not help. I do have a bunch of conhost.exe's that hang around, but killing them doesn't seem to help.
I am changing 'invoke exitProcess,0' to just 'exit' and maybe that will help with the Console Host processes hanging around. but I have always been seeing the program 'has exited with code 0 (or occasionally some other code if I have made a mistake) regardless.
Quinn1000,
The
exit macro just calls
ExitProcess, that won't make any difference.
Quote from: \masm32\macros\macros.asm
exit MACRO optional_return_value
IFNDEF optional_return_value
invoke ExitProcess, 0
ELSE
invoke ExitProcess,optional_return_value
ENDIF
ENDM
Right. It doesn't :( But ty for the information :bg
Well I hate to admit this, but I thought I had VS set to run as administrator but did not. Guess it makes a difference even when you are logged on as admin.
This forum is not a paid help desk, please don't treat it like one. Spare us the "problem Solved" type labels.