Subject: Re: [Boost-build] Problem with resource files on Ubuntu
From: Ian Emmons (iemmons_at_[hidden])
Date: 2010-09-09 17:21:50
Thanks for responding.
On Sep 7, 2010, at 10:26 AM, Jürgen Hunold wrote:
> On Tuesday, 7. September 2010 14:13:35 Ian Emmons wrote:
>> The 64-bit
>> build works fine, but cross-compiling for 32-bits fails on the resource
>> file, Version.res.
> Yes, because the resource compiler is not specified.
I was under the impression (possibly wrong) that on Ubuntu (and Linux in general), there is no resource compiler and Boost.Build simply creates an "empty" .o file (meaning it contains no symbols, not that it is literally zero-length) to serve as the compiled form of the .rc file. This preserves the chain of targets and dependencies that links the .rc source to the linker output.
My interpretation of the error messages (see my original email on this thread) is that Boost.Build invokes the "resource compiler" (actually the assembler) to correctly produce the "empty" .o, but that it ignores the address-model setting while doing so, and therefore produces a .o of the wrong bitness. The linker then fails to link this .o into the final executable.
This is why I recommend using the C++ compiler (rather than the assembler) to produce the "empty" .o -- Boost.Build can then use the identical command line args for the .rc as it does for the .cpp sources, and the "empty" .o will be guaranteed to be compatible.
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk