On 2004-10-08 1:36 PM, Maurizio wrote:
>> windres input.res -o output.o
> I've tried to compile resources in many different ways..
> this one does NOT seem to work.
> Can you post some on-topic examples please?
Rather than construct a teaching example, I'll grab one from
the real world.
Here's something I copied from makefile output and reformatted
for readability. It's actual production stuff, so it's been
well tested and it certainly works, though it's not exemplary.
The relevant parts of the makefile look like this for MinGW:
# TRICKY !! '-i' is ambiguous:
# for windres, it means 'input file'
# for borland, it means 'include path'
RC_INPUT_FILE_INDICATOR := -i
# windres has an anomalous syntax:
# -I means 'input format', while 'include' is --include-dir
# 'define symbol' is not -D, but rather --define
# We explicitly define GNU_WINDRES so that we can write conditional sections
# in the resource file.
# Specialized gcc make-inc files must define $(comp_includes).
gcc_generic_rcflags = \
$(subst -I,--include-dir ,$(comp_includes)) \
--include-dir $(src_dir) \
--define GNU_WINDRES \
--define WINVER=0x0400 \
-I rc \
-O coff \
[omit complex definition of $(comp_includes)]
comp_rcflags = $(gcc_generic_rcflags)
ALL_RCFLAGS = $(comp_rcflags) $(ALLCPPFLAGS)
$(RC) $(ALL_RCFLAGS) $(RC_INPUT_FILE_INDICATOR) $< -o $@
which explains why boost libraries are exposed to the
resource compiler: it's just a harmless accident.
Hmmm...dunno why $(RC_INPUT_FILE_INDICATOR) doesn't
show up. I guess '-i' is assumed. I'll have to fix that.