Menu

#1506 windres CANNOT process the stringify macro!

Known_bugs
closed-invalid
nobody
binutils (105)
2011-02-18
2011-01-16
Shao Hao
No

I found the windres.exe cannot process the stringify macro.

windres 2.21

test code:
test.rc file
=======================

#define MAJOR_VERSION 1
#define MINOR_VERSION 2
#define PATCH_VERSION 3

#define STRINGIFY_HELPER(n) #n

#define VERSION \ STRINGIFY_HELPER(MAJOR_VERSION) "." \ STRINGIFY_HELPER(MINOR_VERSION) "." \ STRINGIFY_HELPER(PATCH_VERSION)

#define VERSION_CSV MAJOR_VERSION ##, \ ##MINOR_VERSION ##, \ ##PATCH_VERSION
1 VERSIONINFO
FILEVERSION VERSION_CSV,0
PRODUCTVERSION VERSION_CVS,0
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x02L
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
===============================

Compile the test.rc file and get the error.

./res.rc:16:1: error: pasting "MAJOR_VERSION" and "," does not give a valid preprocessing token
./res.rc:16:1: error: pasting "," and "MINOR_VERSION" does not give a valid preprocessing token
./res.rc:16:1: error: pasting "MINOR_VERSION" and "," does not give a valid preprocessing token
./res.rc:16:1: error: pasting "," and "PATCH_VERSION" does not give a valid preprocessing token
i486-mingw32-windres: ./res.rc:17: syntax error
i486-mingw32-windres: preprocessing failed.

I caught this bug when I try to compile Apache with mingw32

Discussion

  • Chris Sutcliffe

    Chris Sutcliffe - 2011-01-16

    It's not the stringify macro windres is complaining about, it's how VERSION_CVS is defined.

     
  • Keith Marshall

    Keith Marshall - 2011-01-19
    • status: open --> pending-invalid
     
  • Keith Marshall

    Keith Marshall - 2011-01-19

    If this is a "known bug", you should provide a reference to the original bug report. Where is it? Since *you* have classified this as a "known bug", then *you* should know where to find this; if you don't, then why did you classify this as a "known bug"?

    Without such information, this cannot possibly be a "known bug"; consequently, my instinct is to close it, as an "invalid report".

     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 30 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending-invalid --> closed-invalid