Should .or be removed by a "Clean Directory"? What about .res? Are they compiler version specific?
Mailing lists / lazarus / 2010-06
.or and .res files
12 messages · 3 people · –
- MMark Morgan Lloyd 6
- PPaul Ishenin 4
- MMattias Gaertner 2
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
25.06.2010 2:17, Mark Morgan Lloyd ?????:
Should .or be removed by a "Clean Directory"?
I think yes.
What about .res? Are they compiler version specific?
res files should stay - they are not made by the compiler but by the IDE.
Best regards,
Paul Ishenin.
Paul Ishenin wrote 5 lines
Thanks Paul. I tried compiling the current code I'm working on with 0.9.26/2.2.4 yesterday and had problems which by the looks of it were caused by resources- probably not worth pursuing further but it looks as though something isn't backward-compatible.
Mark Morgan Lloyd wroteThanks Paul. I tried compiling the current code I'm working on with 0.9.26/2.2.4 yesterday and had problems which by the looks of it were caused by resources- probably not worth pursuing further but it looks as though something isn't backward-compatible.
Resources had the big rework in the trunk:
http://lazarus-dev.blogspot.com/2010/02/work-on-0930-changes-in-resource.html Very possible you can have some problems with the old code (like directive {$R project.rc} in the lpr file which is not auto removed).
Best regards,
Paul Ishenin.
Paul Ishenin wrote 10 lines
[Tinkers] 0.9.26 appears not to like the $R line in the .lpr file:
{ you can add units after this };
{$IFDEF WINDOWS}{$R hp495x.rc}{$ENDIF}
{$R *.res} // <=================== THAT ONE
begin
Application.Initialize;I'm not sure what's put it in- 0.9.28 or 0.9.29- but I only see it in the project I'm currently working on.
Mark Morgan Lloyd wrote{$IFDEF WINDOWS}{$R hp495x.rc}{$ENDIF}
This one is the old directive.
{$R *.res} // <=================== THAT ONE
This one is the new directive.
IDE adds the new directive once you edit the project options. It does not remove the old one. Probably it should but how to decide whether this directive was inserted there automatically or manually? So IDE leaves the old directive. As result you get an error with resource linking (duplicate resources).
For the new IDE remove the old directive, for the old remove the new one.
Best regards,
Paul Ishenin.
Paul Ishenin wrote 7 lines
Thanks Paul, noted and (I think) understood.
As a related question, is there an easy way of seeing what conditionals/macros/shell variables the IDE is defining, i.e. the equivalent of the Borland VERxx stuff? I'm obviously interested in extracting the IDE and LCL versions for conditionals around the $R etc.
Show quoted text 16 lines
Source editor / popup menu / file settings / unit info / show codetools values.
Mattias
Mattias Gaertner wrote 7 lines
Thanks, didn't know about that one. So if I'm interpreting things correctly it's easy enough to get the FPC version and use it in conditionals but not to get the Lazarus/LCL version or revision.
Mark Morgan Lloyd wroteThanks, didn't know about that one. So if I'm interpreting things correctly it's easy enough to get the FPC version and use it in conditionals but not to get the Lazarus/LCL version or revision.
Look at lcl\lclversion.pas unit. There we store the LCL version.
Best regards,
Paul Ishenin.
Thanks, didn't know about that one. So if I'm interpreting things correctly it's easy…
Show quoted text 13 lines
use unit lclversion
Mattias
Look at lcl\lclversion.pas unit. There we store the LCL version. Paul Ishenin.
Paul Ishenin wroteLook at lcl\lclversion.pas unit. There we store the LCL version.
Thanks both, noted.
