BUG: Cannot Build a Microsoft Foundation Classes Application After You Add a New Resource File That Contains a String Table (320216)
The information in this article applies to:
- Microsoft Visual C++ .NET (2002)
- Microsoft Visual C++ .NET (2003)
This article was previously published under Q320216 SYMPTOMS In Visual C++ .NET, a Microsoft Foundation Classes (MFC)
application can have multiple resource (.rc) files. However, when you add a new
resource file that contains a string table, and then you try to build the
project or save the resource file, you receive the following error message:
"Resource data is invalid. unable to save resource
script." When you add new string entries in the string table of the
new resource file and then try to build the project again, you may receive the
following error messages: "fatal error CVT1100:
duplicate resource. type:STRING, name:7, language:0x0409"
"fatal
error LNK1123: failure during conversion to COFF: file invalid or corrupt"
CAUSE The first error occurs because there is no string entry in
the string table of the new resource file.
You may receive the
second error message if the IDs in the string tables of the existing resource
file and the new resource file conflict. When Resource Compiler compiles a
string table, it reserves a group of 16 IDs. For example, if ID 100 is used in
the string table of the first resource file and ID 110 is used in the string
table of the second resource file, a conflict occurs. RESOLUTION To work around this problem, follow these steps:
- Add a string entry in the string table of the new resource
file.
- To avoid conflicts, do not use string IDs that are too
close to each other in different resource files of a MFC project. For example,
if one resource file contains the string ID 100, do not use an ID value in the
range 100 to 115 in other resource files of the same MFC project.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 4/11/2003 |
---|
Keywords: | kbbug kbpending KB320216 |
---|
|