Microsoft KB Archive/326987

= FIX: RC1015 Error When Using Resource View If the Include Path is Too Long =

Article ID: 326987

Article Last Modified on 4/11/2003

-

APPLIES TO


 * Microsoft Visual C++ .NET 2002 Standard Edition

-



This article was previously published under Q326987



SYMPTOMS
In the Resource View window, when you expand the tree view of the project resources, you receive the following Microsoft Visual Studio error message:

fatal error RC1015: cannot open include file 'afxres.h'



CAUSE
This problem can be caused by an excessively long Include files directory path (over 512 bytes).



RESOLUTION
Although you can still build the project, you cannot use the WYSIWIG resource editors to modify the .rc file.

To resolve this problem, remove some of the Include paths:
 * 1) On the Tools menu, click Options.
 * 2) In the left pane of the Options dialog box, click the Projects folder, and then click VC++ Directories.
 * 3) In the Show directories for list, click Include files.
 * 4) In the lower window, delete some of the paths, and then click OK.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in Microsoft Visual C++ .NET (2003).



Steps to Reproduce the Behavior

 * 1) On the Tools menu, click Options.
 * 2) In the left pane of the Options dialog box, click the Projects folder, and then click VC++ Directories.
 * 3) In the Show directories for list, click Include files.
 * 4) Copy the longest directory that is listed in the lower window, and then paste it multiple times so that your Visual C++ Include path is longer.
 * 5) Create a new project that contains Windows resources.

Alternatively, delete the .aps file from an existing project, open the project, and then try to expand the resources tree in the Resource View window.

IMPORTANT: You must delete the .aps file if it has already been generated. If the project is already open, the .aps file is locked. Therefore, you must close the project and then delete the file.

The error occurs.

Additional query words: kbBug kbDesigner

Keywords: kbbug kbfix kbpending KB326987

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.