cannot reuse string constant error
Nayab Khan -- nkh069@iadfw.net Friday, November 29, 1996 Environment: VC++ 4.2b, Win 95 I'm getting the following error only in my release build of my two subprojects project: D:\MSDEV\MFC\include/afxres.rc (137): error RC2151 : cannot reuse string constants The line number refers to : AFX_IDS_UNNAMED_FILE "an unnamed file" I get this message while compiling resources. I searched the entire directory tree of VC++ (MSDEV) and my project and couldn't find a reoccurance of AFX_IDS_UNNAMED_FILE . Please help!!! Nayab Khan.
Mike Blaszczak -- mikeblas@nwlink.com Sunday, December 01, 1996 At 11:31 11/29/96 -0600, Nayab Khan wrote: >Environment: VC++ 4.2b, Win 95 > >I'm getting the following error only in my release build of my two >subprojects project: > >D:\MSDEV\MFC\include/afxres.rc (137): error RC2151 : cannot reuse string >constants > >The line number refers to : > AFX_IDS_UNNAMED_FILE "an unnamed file" > >I get this message while compiling resources. I searched the entire >directory tree of VC++ (MSDEV) and my project and couldn't find a >reoccurance of AFX_IDS_UNNAMED_FILE . The problem is that you've used some resource in your projects which has the ID _value_ the same as the AFX_IDS_UNNAMED_FILE symbol. The symbol is defined in MFC\INCLUDE\AFXRES.H as 0xF006, which is the same as 61446 in decimal. Some resource in your application is using this same value for one of its symbols. You should use this value in any of your applications. TN020 explains what ranges are not safe, and you're sitting right there in one of them. .B ekiM http://www.nwlink.com/~mikeblas/ I'm afraid I've become some sort of speed freak. These words are my own. I do not speak on behalf of Microsoft.
Brad Wilson/Crucial Software -- crucial@pobox.com Sunday, December 01, 1996 > The line number refers to : > AFX_IDS_UNNAMED_FILE "an unnamed file" > > I get this message while compiling resources. I searched the entire > directory tree of VC++ (MSDEV) and my project and couldn't find a > reoccurance of AFX_IDS_UNNAMED_FILE . Look at the # that AFX_IDS_UNNAMED_FILE is defined as, then look through your resource.h for a symbol that is defined with the same #. -- Brad Wilson Custom software development & solutions crucial@pobox.com Internet and intranet consulting services The Brads' Consulting Windows NT/Windows 95 software development http://www.thebrads.com Web site planning, development and maintenance
LeRoy Baxter -- lbaxter@transport.com Sunday, December 01, 1996 had this problem when migrating from VC++ 4.1 to VC++ 4.2 It appears that the IDE incorrectly handles some of the #defines If you look, you will find a resource #define with the same _numeric_ value as 'AFX_IDS_UNNAMED_FILE'. You may need to pull your .rc or resource.h file in as _text_ and make the changes manually. On Friday, November 29, 1996 9:31 AM, Nayab Khan[SMTP:nkh069@iadfw.net] wrote: >Environment: VC++ 4.2b, Win 95 > >I'm getting the following error only in my release build of my two >subprojects project: > >D:\MSDEV\MFC\include/afxres.rc (137): error RC2151 : cannot reuse string >constants > >The line number refers to : > AFX_IDS_UNNAMED_FILE "an unnamed file" > >I get this message while compiling resources. I searched the entire >directory tree of VC++ (MSDEV) and my project and couldn't find a >reoccurance of AFX_IDS_UNNAMED_FILE . > >Please help!!! > >Nayab Khan. > >
Greg D. Tighe -- gdt@eng.aisinc.com Monday, December 02, 1996 In MSVC++ 4.2, AFX_IDS_UNNAMED_FILE is defined in MSDEV\mfc\include\AFXRES.H: #define AFX_IDS_UNNAMED_FILE 0xF006 Assuming this is the same for the 4.2b patch which you have, try searching for "f006" within your own project's files to see if some other resource id was inadvertently given the value 0xF006. If this fails try searching for the decimal equivalent, 61446. > From: "Nayab Khan"> To: > Subject: cannot reuse string constant error > Date: Fri, 29 Nov 1996 11:31:37 -0600 > Reply-to: mfc-l@netcom.com > Environment: VC++ 4.2b, Win 95 > > I'm getting the following error only in my release build of my two > subprojects project: > > D:\MSDEV\MFC\include/afxres.rc (137): error RC2151 : cannot reuse string > constants > > The line number refers to : > AFX_IDS_UNNAMED_FILE "an unnamed file" > > I get this message while compiling resources. I searched the entire > directory tree of VC++ (MSDEV) and my project and couldn't find a > reoccurance of AFX_IDS_UNNAMED_FILE . > > Please help!!! > > Nayab Khan. > > > -Greg Tighe Applied Intelligent Systems, Inc. Ann Arbor, MI gdt@aisinc.com
Michael Iles -- michaeli@dra.com Monday, December 02, 1996 On Friday, November 29, 1996 12:31 PM, Nayab Khan[SMTP:nkh069@iadfw.net] wrote: > >D:\MSDEV\MFC\include/afxres.rc (137): error RC2151 : cannot reuse string >constants > >I get this message while compiling resources. I searched the entire >directory tree of VC++ (MSDEV) and my project and couldn't find a >reoccurance of AFX_IDS_UNNAMED_FILE . You can certainly _reference_ string constants more than once in your program :) This error indicates that two string resource IDs in your resource.h are defined to have the same value. Mike.
John Addis -- jaddis@erols.com Wednesday, December 04, 1996 > From: Greg Tighe> To: mfc-l@netcom.com > Subject: Re: cannot reuse string constant error > Date: Monday, December 02, 1996 9:18 AM > > In MSVC++ 4.2, AFX_IDS_UNNAMED_FILE is defined in > MSDEV\mfc\include\AFXRES.H: > > #define AFX_IDS_UNNAMED_FILE 0xF006 > > Assuming this is the same for the 4.2b patch which you have, try > searching for "f006" within your own project's files to see if some > other resource id was inadvertently given the value 0xF006. If this > fails try searching for the decimal equivalent, 61446. More precisely, the problem is that there is another entry in your *string table* with the same ID. -john
| Вернуться в корень Архива |