FIX: D2004 Caused by /Tp or /Tc Option in Visual C++ 4.0

Last reviewed: September 19, 1997
Article ID: Q142421
4.00 WINDOWS NT kbtool kbbuglist kbfixlist

The information in this article applies to:

  • The development environment included with: Microsoft Visual C++, 32-bit Edition, version 4.0

SYMPTOMS

If the /Tp or /Tc compiler option is used in a project built within the Developer Studio, one of the following errors occurs:

   Command line error D2004 : '/Tp' requires an argument

   -or-

   Command line error D2004 : '/Tc' requires an argument

RESOLUTION

To work around the problem:

  • Build the project from the command line. For example:

    nmake /f <projectname.mak>

    NOTE: You may need to run Vcvars32.bat from the \Msdev\Bin directory to set up the environment variables needed to build from the command line.

    -or-

  • Rename the source files to have the needed extension so the /Tp or /Tc option is not needed.

STATUS

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

MORE INFORMATION

The /Tc option specifies that the file is a C source file, even if it doesn't have a .c extension. The /Tp option specifies that the file is a C++ source file, even if it doesn't have a .cpp or .cxx extension. These options worked for projects built within the Visual C++ 2.x environment. If you convert a project from version 2.x to 4.0 that has these options, you will get the previously described error.


Additional reference words: 4.00 4.10
KBCategory: kbtool kbbuglist kbfixlist
KBSubcategory: VWBIss vcbuglist400 vcfixlist410
Keywords : vcbuglist400 vcfixlist410 VwbIss kbbuglist kbfixlist kbtool
Version : 4.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 19, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.