Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-06

.or and .res files

12 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mark Morgan Lloyd

Should .or be removed by a "Clean Directory"? What about .res? Are they compiler version specific?

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Paul Ishenin
to Mark Morgan Lloyd

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.

Reply by email

Mark Morgan Lloyd
to Paul Ishenin
Paul Ishenin wrote 5 lines
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.

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 markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Paul Ishenin
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote
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.

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.

Reply by email

Mark Morgan Lloyd
to Paul Ishenin
Paul Ishenin wrote 10 lines
25.06.2010 16:25, Mark Morgan Lloyd wrote: > 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. 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).

[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 markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Paul Ishenin
to Mark Morgan Lloyd
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.

Reply by email

Mark Morgan Lloyd
to Paul Ishenin
Paul Ishenin wrote 7 lines
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.

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.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mattias Gaertner
to Mark Morgan Lloyd
Show quoted text 16 lines
Paul Ishenin wrote: > 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. 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.

Source editor / popup menu / file settings / unit info / show codetools values.

Mattias

Reply by email

Mark Morgan Lloyd
to Mattias Gaertner
Mattias Gaertner wrote 7 lines
> 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. Source editor / popup menu / file settings / unit info / show codetools values.

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 markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Paul Ishenin
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote
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.

Look at lcl\lclversion.pas unit. There we store the LCL version.

Best regards,
Paul Ishenin.

Reply by email

Mattias Gaertner
to Mark Morgan Lloyd: Thanks, didn't know about that one. So if I'm interpreting things correctly it's easy…
Show quoted text 13 lines
Mattias Gaertner wrote: >> 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. > > Source editor / popup menu / file settings / unit info / show > codetools values. 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.

use unit lclversion

Mattias

Reply by email