windres error with RCDATA Resource

This is a discussion on windres error with RCDATA Resource within the Windows Programming forums, part of the Platform Specific Boards category; I use Dec-C++ 4.9.8.0. I trying to compile a simple Windows Application in C which uses a .rc file like ...

  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    35

    windres error with RCDATA Resource

    I use Dec-C++ 4.9.8.0. I trying to compile a simple Windows Application in C which uses a .rc file like this:

    Code:
    #include <windows.h>
       
    RCDATA_0 RCDATA
    MOVEABLE PURE LOADONCALL DISCARDABLE
    LANGUAGE LANG_NEUTRAL, 0
    BEGIN
    '50 4B 03 04 14 00 00 00 08 00 6C 8E 83 25 A0 DE '
    '2D 2A B0 C3 03 00 0E 3B 0F 00 08 00 00 00 52 53 '
    '33 32 2E 48 4C 50 BC 5B 0B 74 1C D5 79 FE 77 25 '
    ...
    ...
    '00 00 00 00 01 00 01 00 36 00 00 00 D6 C3 03 00 '
    '00 00 '
    END
    This .rc file specifies a raw data resource for my application. The purpose of this .rc file is to include binary data directly in the executable file. I've made the .rc file using Resoucer Builder (http://www.sicomponents.com/rbldr.html).

    When I try to build my proyect I get the following error message:

    Code:
     stdout: Invalid argument
    windres.exe: resources.rc:7: parse error
    make.exe: *** [resources_private.res] Error 1
    What is the problem? Has the .rc file generated by Resource Builder some errors or a format not valid for windres?

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    You may recognise '4B' as a hex value but the resource compiler doesn't so you'll need to prepend each value with 0x eg. 0x4B. Also lose the apostrophes ( ' ) and separate each numerical value with a comma. eg.
    Code:
    BEGIN
      0x50, 0x4b, 0x03 etc.
    END
    Refer to the information and, in particular, the example at the foot of this page for more details or clarification of these points.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Sorting out a resource manager
    By psychopath in forum Game Programming
    Replies: 1
    Last Post: 11-10-2008, 07:12 PM
  2. unmanaged resource
    By George2 in forum C++ Programming
    Replies: 2
    Last Post: 01-03-2008, 04:23 AM
  3. CreateProcess with Resource of executable, not the Filename
    By Ktulu in forum Windows Programming
    Replies: 4
    Last Post: 11-04-2006, 01:07 AM
  4. Generic Resource_Manager WIP with lots TODO
    By Shamino in forum C++ Programming
    Replies: 19
    Last Post: 02-01-2006, 01:55 AM
  5. Serial Communications in C
    By ExDigit in forum Windows Programming
    Replies: 7
    Last Post: 01-09-2002, 10:52 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21