Re: Make Exe problem

From: Randy Birch (rgb_removethis_at_mvps.org)
Date: 10/05/04


Date: Mon, 4 Oct 2004 21:44:29 -0400


      Knowledge Base

PRB: LINK Fatal Error LNK1104 Cannot Open FilePSS ID Number: 166470

Article Last Modified on 10/30/2003

----------------------------------------------------------------------------

----
The information in this article applies to:
  a.. Microsoft Visual Basic Professional Edition for Windows 5.0
  b.. Microsoft Visual Basic Enterprise Edition for Windows 5.0
----------------------------------------------------------------------------
----
This article was previously published under Q166470
SYMPTOMS
When compiling an ActiveX component with binary compatibility set to the
same file the compile is attempting to overwrite, the following error
occurs:
LINK fatal error LNK1104 cannot open file.
RESOLUTION
To work around this problem, copy the ActiveX executable or DLL to a
separate directory. Set binary compatibility to the copied file, and compile
to the original directory. This procedure is described in Microsoft Visual
Basic Books Online.
STATUS
Microsoft is researching this problem and will post new information here in
the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
While this behavior is not always encountered when compiling, you should
follow the procedures in the RESOLUTION section above in all projects where
you set binary compatibility.
Steps to Reproduce Behavior
  1.. Start Visual Basic 5.0 and open the
\samples\CompTool\ActvComp\coffee\xtimers.vbp sample.
  2.. Select "Make XTimer.dll" from the File menu to compile the project.
  3.. Select "Open Project" from the File menu.
  4.. Save the changes to the XTimer project if prompted.
  5.. Open the \samples\CompTool\ActvComp\coffee\coffee2.vbp sample.
  6.. Bring up the Project\References dialog box and make sure that the
XTimer server compiled previously is referenced.
  7.. Select "Make Coffe2.exe" from the file menu to compile the project.
  8.. Bring up the "Coffee2 Properties" dialog box from the Project menu.
  9.. On the Compile tab, make sure "Native Code" is selected.
  10.. On the Component tab, make sure "Binary Compatibility" is set and the
compatible server is pointing at the previously compiled version of
Coffe2.EXE.
  11.. Save the changes to the project.
  12.. Select "Make Coffe2.exe" from the file menu to compile the project.
You receive a dialog box with the following message:
Microsoft Visual Basic: Unexpected error occurred in code generator or
linker. -View error messages?
If you click "Yes," the following error message appears:
LINK fatal error LNK1104 cannot open file.
To fix this problem:
  1.. Copy the executable to another directory. If you make ActiveX
components frequently, you may want to create a directory just for
compatible files.
  2.. Re-set binary compatibility to the file you just pasted into the
"Compatibility" directory.
  3.. Recompile the executable into the project directory.
REFERENCES
Microsoft Visual Basic Books Online, Component Tools Guide, Using Binary
Version Compatibility.
Keywords: kbprb KB166470
Technology: kbAudDeveloper kbVB500 kbVB500Search kbVBSearch kbZNotKeyword2
kbZNotKeyword6
----------------------------------------------------------------------------
----
Send feedback to Microsoft
© 2004 Microsoft Corporation. All rights reserved.
-- 
Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/
"Yokino" <sfthum@gmail.com> wrote in message
news:uzfc9nnqEHA.3580@TK2MSFTNGP10.phx.gbl...
: Hi All,
:
: I have problem with making Exe file problem. When i try to make exe...
: It show this error:-
: Unexpected error occured in code generator or linker. View error message?
:
: if i press yes... it display: -
: Microsoft (R) Incremental Linker Version 6.00.8447
: Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
:
: LINK : fatal error LNK1104: cannot open file
:
: what's the problem? i have 512MB of ram... and i'm using VB6 Sp6. even i
: copy my source code to other machine also have same error message.
:
:


Relevant Pages

  • Re: BSCMAKE error BK1506
    ... error message is valid. ... BSCMAKE: error BK1506: cannot open file '\Dacserver\mijn documenten ... After i do a complete rebuild i can compile and run, ...
    (microsoft.public.vc.mfc)
  • Re: [SLE] Please! I could use some help!
    ... I don't know what SuSE distribution you are running -- I came in late on ... "NULL" error message ... to ensure he was getting a working installation. ... and do some simple compile development exercises until you gain the ...
    (SuSE)
  • Re: Error exiting database
    ... without error if you choose 'Compile ' form the Debug ... > The Load Event looks like this but I don't understand why it would fire ... >> The error message, though, indicates that the problem is in the Load ... >> GlobalSign digital certificate is a forgery and should be deleted without ...
    (microsoft.public.access.formscoding)
  • Re: using #ifndef
    ... > gone to the newsgroup as well. ... that was ERT's fault for sending his response both by ... but nothing that anyone else could actually compile. ... cut-and-paste the actual error message. ...
    (comp.lang.c)
  • Re: Proper way to save a record
    ... The error message tells the user the exact problem ... MsgBox "You must enter a value into Patient Number." ... > control., such as ... > name, and compile your code, you get a error. ...
    (microsoft.public.access.formscoding)