I managed to make it work, but I don't know what I did right...
(I think the trick is including the windows.h header) I used the ResEdit software on a random DLL I took from C:\Windows\. Using that one as example, I composed the following .rc file:
Code:
#include <windows.h>
//
// Version Information resources
//
// Further references:
// http://msdn.microsoft.com/en-us/library/windows/desktop/aa381058(v=vs.85).aspx
//
//
LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
1 VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE 0
FILEFLAGSMASK VS_FF_PRIVATEBUILD
FILEFLAGS 0x00000000
{
BLOCK "StringFileInfo"
{
BLOCK "041604E4"
{
VALUE "Comments", "commmented"
VALUE "CompanyName", "myCompanyName"
//Required values:
VALUE "FileDescription", "BlahBlahBlah"
VALUE "FileVersion", "1.0.00"
VALUE "ProductVersion", "1.0.00"
VALUE "InternalName", "filename.dll"
VALUE "LegalCopyright", "Copyright © 2012"
VALUE "LegalTrademarks", "2012"
VALUE "OriginalFilename", "filename_original.dll"
VALUE "ProductName", "product"
VALUE "PrivateBuild", "pb"
}
}
BLOCK "VarFileInfo"
{
/* The following line should only be modified for localized versions. */
/* It consists of any number of WORD,WORD pairs, with each pair */
/* describing a language,codepage combination supported by the file. */
/* */
/* For example, a file might have values "0x409,1252" indicating that it */
/* supports English language (0x409) in the Windows ANSI codepage (1252). */
VALUE "Translation", 0x416, 1252
}
}
Next, I used the windres(from the MinGW suite) command to build the .o object file:
Code:
windres ../Resources/resources.rc ../Resources/resource.o
Then I compiled it:
Code:
g++ -L../../Libs -shared -o myDll.dll Sources\a.o Sources\b.o Sources\c.o Sources\d.o ..\Resources\resource.o -lmylib
After that, the file information was filled at my O.S.
See Ya!