Forum > Free Pascal

fpcres now supports compilation of RC files

<< < (5/5)


--- Quote from: lucamar on December 17, 2020, 09:59:48 am ---
--- Quote from: PascalDragon on December 17, 2020, 09:23:36 am ---Yes, we've decided against enabling res output by default (or some auto magic) due to backwards compatibility.
--- End quote ---

But, what about .rc input? Is it also disabled unless an output format is set? 'Cause that would kind of defeat the purpose of the new feature  ... whatever that is :)
--- End quote ---

The compiler knows that it needs to pass -of res.

--- Quote from: lucamar on December 17, 2020, 09:59:48 am ---IMHO, when one adds a new input format one should also define a default output one for it, depending on the purpose of the tool. Since fpcres has 'most always been about creating an object for linking, it's understandable that res output be available only on demand, but the problem seems to be that there is no default support for rc input either.
--- End quote ---

That is not how the classes in fcl-res work. Multiple different kinds of inputs can be used and their corresponding reader class is determined based on the content and not based on the file extension. The RC reader however is essentially a catch-all reader, thus it must not be enabled by default.
And the output format of fpcres is by default the binary resource format for the target (e.g. ELF, COFF, etc.).

--- Quote from: marcov on December 17, 2020, 10:50:06 am ---I tried on one of my RCs (which embed shader files as resource streams), and it gives an error.
--- End quote ---

Best put that in a bug report with an example that can be used to reproduce this.

Ok, if you don't immediately recognize it, it is a bug. Filed as 38228


[0] Message Index

[*] Previous page

Go to full version