The Resource Compiler

The resource compiler takes resource scripts (.rc) and turns them into object files (.o) to be linked to your program. The resource compiler provided for the GNU compiler suite is called windres. Currently there is a limitation with the resource compiler and linker combination that means you can not reliably use more than one object file with resources. You must compile all the resources for a single program or DLL in one resource script and create one object file.

You can run windres like this:

windres -i foo.rc -o foo.o

That takes the resource script foo.rc and turns it into the object file foo.o. Then you can link that object file just like any other object file in your program.

For more information on resource scripts see the section on resource scripts and the section on resources in general in the Win32 programming tutorial.