Re: E2161 Duplicate string



Danny Strümpel wrote:
E Sterrett schrieb:
I am trying to use this function for looking up mime types:

http://www.swissdelphicenter.ch/torry/showcode.php?id=2285

The resource file it comes with has hundreds of strings in it, but I have stripped it down to just one:

STRINGTABLE
BEGIN
101, ".3dm x-world/x-3dmf"
END

The project will not compile with this error:

[Pascal Error] E2161 Duplicate string: ID 101; File ...\mimetypes.res string kept: ".3dm x-world/x-3dmf"; file ...\mimetypes.res resource discarded: ".3dm x-world/x-3dmf".

Any idea whats wrong?

Delete all res files in your project and do a complete rebuild (Shift-F9). You need to have the matching rc files included in your project, so they also get rebuild. The <Projectname>.res doesn't have a rc file, it will be built by the compiler.

I've tried all that.

Worked around it by using a Tstringlist and a text file rather than a string table.

Still rather strange and annoying.
.



Relevant Pages

  • Re: E2161 Duplicate string
    ... The resource file it comes with has hundreds of strings in it, but I have stripped it down to just one: ... The project will not compile with this error: ... You need to have the matching rc files included in your project, so they also get rebuild. ...
    (alt.comp.lang.borland-delphi)
  • Re: E2161 Duplicate string
    ... The resource file it comes with has hundreds of strings in it, ... The project will not compile with this error: ...
    (alt.comp.lang.borland-delphi)
  • Re: Why leave the error handling to the caller?
    ... I didn't even mention the fact that it didn't compile. ... If the intended behavior of the program is to simply output all the strings with no further processing there would never be any reason for storing them and whatever is in the error recovery part of the program would better be the *entire* program. ... I assume the purpose of allocating the strings in some structure to begin with is that there really is some further processing to be done before outputting them. ... That would make the error handling function output data that would be wrong. ...
    (comp.lang.c)
  • Re: [Bugme-new] [Bug 11446] New: Automate "to compile as module" strings
    ... Automate "to compile as module" strings ... Component: Configuration ... tristate "BMAC support" ...
    (Linux-Kernel)
  • Re: csc (C# Compiler) bug
    ... > I seem to have found a bug in csc. ... Here is some source that does not compile properly: ... This does not happen with all strings ... Its not a bug, its actually correct. ...
    (microsoft.public.dotnet.languages.csharp)