FIX: Link /OUT Does Not Rename Target

Last reviewed: September 18, 1997
Article ID: Q119500
1.00 WINDOWS NT kbtool kbfixlist kbbuglist

The information in this article applies to:

  • The Visual Workbench included with: Microsoft Visual C++ 32-bit Edition, version 1.0

SYMPTOMS

When building a project with a makefile created by the Visual Workbench, if you attempt to specify the output filename (.EXE or .DLL) by selecting the Options menu, and choosing Project, Linker, Output, or specifying the /OUT switch by selecting the Options menu and choosing Project, Linker, Miscellaneous, Other Options, the target name remains unchanged. The target is named according to the base name of the makefile being used.

RESOLUTION

To work around the problem, add a line similar to the following ( without brackets ):

 REN <makefile base name>.<EXE or DLL> <new target base name>.<EXE
 or DLL>

to the Visual Workbench-generated makefile, immediately following the LINK command line in the inference rule that causes LINK to be executed. The resulting makefile can be used with NMAKE from the command line, as well as by the Visual Workbench. The caveat here is that when using the (modified) makefile in the Visual Workbench, the makefile must be opened as an external makefile, so that the inference rules will be used when NMAKE is spawned. When an "internal" makefile is used, the inference rules in the Visual Workbench-generated makefile are not used, rather, the Visual Workbench manages the build process much like NMAKE would, without actually spawning NMAKE. Using the modified makefile as an "internal" makefile will not give an error, but the target file will not be renamed. The only way to ensure that the target will properly be renamed is to use the modified "internal" makefile as an external makefile.

STATUS

Microsoft has confirmed this to be a bug in the products listed at the beginning of this article. This problem was corrected in Visual C++ version 2.0.


Additional reference words: 1.00
KBCategory: kbtool kbfixlist kbbuglist
KBSubcategory: VWBIss
Keywords : VwbIss kbbuglist kbfixlist kbtool
Version : 1.00
Platform : NT WINDOWS
Solution Type : kbfix


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: September 18, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.