BUG: "Link Returned Error Code 3" in Visual Workbench

Last reviewed: July 17, 1997
Article ID: Q98410
1.00 1.50 WINDOWS kbtool kbbuglist

The information in this article applies to:

  • The Visual Workbench included with: Microsoft Visual C++ for Windows, versions 1.0 and 1.5

SYMPTOMS

In Microsoft Visual C++ (MSVC) version 1.0, an attempt to build an application may fail when the linker generates the following message not listed in the printed documentation:

   Link Returned Error Code 3

After this message appears, the build window displays the following status indication:

   0 Errors, 0 Warnings

This status appears even though a link error did occur.

CAUSE

The MSVC build engine does not correctly process errors that do not have the form "Annnn" (one letter followed by four digits). Therefore, the status indicates that no error occurred.

STATUS

Microsoft has confirmed this to be a problem in Visual Workbench versions 1.0 and 1.5 for Windows. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

"Link Error Code 3" occurs when low memory conditions occur during the build operation. At least five to seven megabytes of memory should be free in Windows before you run MSVC. The exact amount of memory MSVC requires depends on the project you are building. If the "Link Error Code 3" message appears, you should free memory by closing applications, removing nonessential MS-DOS terminate-and-stay-resident (TSR) or driver programs, or increasing the size of the Windows swap file. On some systems, more than one of these steps may be required.

Another step that corrects this problem on some machines involves setting the MS-DOS TMP environment variable to specify a valid drive and directory that contain at least 1 megabyte of free disk space. To do so, edit your AUTOEXEC.BAT file to include the following line:

   SET TMP=C:\MSVC

(You can specify any valid drive and directory combination that has the required amount of free disk space.) Shutdown and reboot your computer so the modification takes effect.


Additional reference words: 1.00 1.50
KBCategory: kbtool kbbuglist
KBSubcategory: VWBIss
Keywords : kb16bitonly


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 17, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.