Microsoft KB Archive/113419

{| = PRB: "There Are No Source Files in This Project" Dialog Box =
 * width="100%"|

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         : kberrmsg kbide kbVC Version          : 1.0 1.5 1.51 1.52 2.0 2.1 4.0 5. Platform         : NT WINDOWS Issue type       : kbprb
 * }