PRB: "There Are No Source Files in This Project" Dialog Box

Last reviewed: July 31, 1997
Article ID: Q113419
The information in this article applies to:
  • The Visual Workbench included with: - Microsoft Visual C++ for Windows, versions 1.0, 1.5, 1.51, 1.52 - Microsoft Visual C++ 32-bit Edition, versions 1.0, 2.0, 2.1, 4.0, 5.0

SYMPTOMS

When trying to do a Build or a Rebuild All, a dialog box with the following text may appear and stop the build process:

   There are no source files in this project.

In Microsoft Visual C++, 32-bit Edition, version 2.0 and above, the error is:

   There is no source file to build.

CAUSE

This problem occurs when the list of files for the current project does not contain at least one file with the .C, .CPP, .CXX, .OBJ, .LIB, or .RC extension.

This error occurs most often when creating a new project before source files for the project actually exist (the Visual Workbench allows you to do this but you can't build the project because there is nothing to compile or link).

RESOLUTION

Two solutions exist:

  • Create the makefile after creating (and saving) one or more of the source files, so that they can be added to the "Files in Project" list when the makefile is created.

    -or-

  • Add at least one source file with the required extension to the Files in Project list by choosing Edit from the Project menu, selecting the file in the File Name window, and choosing the Add button. Choose Close and then try the build procedure again.

NOTE: In both cases, these suggestions allow the build process to proceed, but errors may result from the build itself.


Additional query words: .MAK
Keywords : VwbIss kberrmsg
Version : 1.0 1.5 1.51 1.52 2.0 2.1 4.0 5.
Platform : NT WINDOWS
Issue type : kbprb


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