[fpc-pascal] Placing binary data (resources) in object files?

Anthony Walter sysrpl at gmail.com
Mon Jun 3 23:49:07 CEST 2013


Jonas,

It's not happening. I have a 700kb image base64 encoded in a file called
orangesky.res. I never use "procedure TestResource;" and yet the exe is
700kb larger. The only way to get rid of that extra 700k is to delete the
procedure. The smart linking option or using strip do not remove the 700k.

{ TestResource procedure is not called from any code }
procedure TestResource;
const
  Data = {$i orangesky.res}; // 700kb constant is always built into the app
var
  S: string;
  I: Integer;
begin
  S := Data;
  for I := 1 to 10 do
    WriteLn(S[I * 10]);
end;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130603/2428c053/attachment.html>


More information about the fpc-pascal mailing list