User forums > Using Code::Blocks

DLL Version Info

(1/1)

BigAngryDog:
Hi there,

I have been using rc files to set exe version info without problem.

However, when I try the same with a DLL project, the resulting binary has no version info.

How do I set DLL version info with C:B?

Thanks

BigAngryDog:
If it helps, here's the section of my rc file:

I use a "FILETYPE 0x0L" for exes, and I get version info no problems. But with a DLL there is nothing.



--- Code: ---#include "version_info.h"

VS_VERSION_INFO VERSIONINFO
FILEVERSION MAJOR,MINOR,PATCH,1
PRODUCTVERSION MAJOR,MINOR,PATCH,1

FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
  FILEFLAGS 0x1L
#else
  FILEFLAGS 0x0L
#endif
//FILEOS VOS__WINDOWS32
// VOS_UNKNOWN VOS_DOS VOS_NT VOS__WINDOWS32 VOS_DOS_WINDOWS32 VOS_NT_WINDOWS32

FILETYPE 0x1L
// VFT_APP VFT_DLL VFT_DRV VFT_FONT VFT_VXD VFT_STATIC_LIB

FILESUBTYPE 0x0L
{
  BLOCK "StringFileInfo"
  {
    BLOCK "040904b0"
    {
      VALUE "Comments", ""
      VALUE "CompanyName", COMPANYNAME
      VALUE "FileDescription", PRODUCTNAME
      VALUE "InternalName", ""
      VALUE "LegalCopyright", COPYRIGHT
      VALUE "OriginalFilename", ""
      VALUE "ProductName", PRODUCTNAME
      VALUE "FileVersion",  VERSIONSTR
      VALUE "ProductVersion", VERSIONSTR
    }
  }
  BLOCK "VarFileInfo"
  {
    VALUE "Translation", 0x409, 1200
    // 0x409 US 0x0809 UK
    // 1200 Unicode
  }
}

--- End code ---

Am I doing anything wrong?

keenblade:
I use the code which I ripped from dev-c++ resource file. It works for dll files, too.

--- Code: ---#include <windows.h> // include for version info constants

1 VERSIONINFO
FILEVERSION 0,1,1,1
PRODUCTVERSION 0,1,1,1
FILETYPE VFT_APP
{
  BLOCK "StringFileInfo"
{
BLOCK "040904E4"
{
VALUE "CompanyName", ""
VALUE "FileVersion", ""
VALUE "FileDescription", "Developed using the Code::Blocks"
VALUE "InternalName", ""
VALUE "LegalCopyright", ""
VALUE "LegalTrademarks", ""
VALUE "OriginalFilename", ""
VALUE "ProductName", ""
VALUE "ProductVersion", ""
}
}
  BLOCK "VarFileInfo"
{
VALUE "Translation", 0x0409, 1200
}
}

--- End code ---

BigAngryDog:
Thanks.

Believe it may have been this line causing the problem.

FILESUBTYPE 0x0L

Cheers :)

Navigation

[0] Message Index

Go to full version