问题
I have added text file with following content to the project:
1 24 "MyApplication.manifest"
In the same folder there is also MyApplication.manifest
file which is XML - this one:
C++ Builder / Delphi 2010 application manifest template
After I attempt to build resource from RC I get error - Bad character in source input(1)
Any ideas why?
RT_MANIFEST
value is 24, but I am unsure what 1 is supposed to be.
回答1:
I managed to find the answer myself so no answer necessary. The problem was, as usual very obscure.
Turned out that the resource script file (.RC) I was using had an UTF-8 byte order mark in the file (0xEF,0xBB,0xBF
) which was invisible to the text editor but resource compiler complained about it. After removing the BOM resource compiled correctly.
I don't think many people fall into this trap but at least if anyone else sees this error in resource compiler, you should examine if there is an UTF-8 BOM in your file by viewing HEX-dump of RC file because brcc32.exe
resource compiler seems to have issues with that.
来源:https://stackoverflow.com/questions/25538863/resource-compilation-error-bad-character-in-source-input