0

I'm working on a project I did not start and I added

#define IDS_SELF_UPDATE_EXIT            266

and

IDS_CONFIRM_EXIT        "Are you sure you want to quit?"

and I got the following error twice:

error RC2135: file not found

What am I doing wrong?

GreatDane
  • 683
  • 1
  • 9
  • 31
  • Which C++ compiler do you use ? Check if the encoding of your .rc file is ANSI. You can do latter by opening your .rc file with notepad, then you do File-Save As and check that "Encoding" is "ANSI" in the Save As dialog. – Jabberwocky Aug 30 '13 at 11:20
  • 1
    Why do you manually edit the file when there is a resource editor for such files? – Marius Bancila Aug 30 '13 at 11:21
  • 1
    Forget about the DIALOGEX stuff in the other stackoverflow question. It is probably totally unrelated. – Jabberwocky Aug 30 '13 at 11:48
  • The encoding was UTF-8 and changing to ANSI does the trick, but it also changes the special characters from the file to weird accented ones. I checked the older versions of the file, from when it worked, and the encoding was also UTF-8. I reverted to an older version, but it still doesn't work. I'm using Visual Studio 2010. – GreatDane Aug 30 '13 at 12:45
  • How did you change the enconding from UTF-8 to ANSI. Which special caracters have been changed to weird ones. Give me an example. – Jabberwocky Aug 30 '13 at 12:55
  • I changed the encoding with Notepad++. "Verifică" becomes "VerificÄ", "Ieșire" becomes "IeĹźire", so on and so forth. – GreatDane Aug 30 '13 at 13:01
  • @Marius I haven't worked with resource files before. Had I known it isn't advised, I wouldn't have done it. Anything in particular you would recommend? – GreatDane Aug 30 '13 at 13:13

1 Answers1

1

You seem to be trying to create a stringtable resource. The correct syntax is

STRINGTABLE
BEGIN
  IDS_CONFIRM_EXIT        "Are you sure you want to quit?"
END
Igor Tandetnik
  • 50,461
  • 4
  • 56
  • 85
  • I was trying to add another string to a string table, except I was not doing it right. Instead of editing the resource file with the resource file editor VS offers, I edited it in VS, but manually, as a normal source file. Another issue I had was that the language setting of the keyboard used different encoding than the one in the resource file. – GreatDane Aug 30 '13 at 16:20
  • The error message you cited suggests that you placed that line at the top level of the file, outside of stringtable's `BEGIN/END` block. Is this not what happened? Also, what bearing does `IDS_SELF_UPDATE_EXIT` macro have on the situation? Why have you shown it? – Igor Tandetnik Aug 30 '13 at 16:28