So I was developing my C++ application when a came across windows resource files (.rc), my application is in portuguese of portugal so I wrote my file like this:
MAIN ICON "icon.ico"
MAIN VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "081604b0"
BEGIN
VALUE "Comments", "Tenta a tua Sorte!"
VALUE "CompanyName", "Adsglobal"
VALUE "FileDescription", "Jogo Simples"
VALUE "FileVersion", "1.0.0.0"
VALUE "InternalName", "Tenta a Sorte"
VALUE "LegalCopyright", "Copyright © Rodrigo Santos 2020"
VALUE "OriginalName", "Tenta a Sorte"
VALUE "ProductName", "Tenta a Sorte"
VALUE "ProductVersion", "1.0.0.0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0816, 1200
END
END
For some reason that I don't know when I compile it with g++ and windres, I get the icon but the version info isn't displayed.
If you can help me please awnser this
You are specifying the wrong ID for the
VERSIONINFOresource. Per theVERSIONINFOdocumentation, the ID must be1, notMAIN:So, try this instead:
Alternatively, you can use the
VS_VERSION_INFOmacro, which is pre-defined in<winver.h>, eg: