Link to home
Start Free TrialLog in
Avatar of jeurk
jeurk

asked on

is a .dcu compatible with all Delphi version

Hello,
Can someone confirm that a .dcu is not
working for other delphi version then
the one it was compiled with ?
Stay basic (only 20 points for that ;)
Avatar of Lischke
Lischke

I can confirm that. For *all* versions of Delphi either a new DCU format has been introduce or Delphi will complain about a unit compiled with an earlier version.

Ciao, Mike
Lischke speaks the truth

In my experience occasionally a D2 DCU will behave with D3.  But since d3 and the advent of component packages, it becomes a bit mucky to pull older version DCU files into a newer compiler.  A lot of it has to do with the VCL changing a lot. And it's a pain in the butt to make em work.
Avatar of jeurk

ASKER

I see, it was just to be sure.
so you say that it's not impossible
that it will work. But it's not a good
solution at all.
Another thing.
Someone already try to load a package compiled at Delphi 4 with Delphi5 ?

T++, Radler.
My comments to this is:

Using compiled .dcu from erlier or newer versions might work, but you cannot be sure, that it will.
This wil of course have to do with the objects implemented. For instance: If you have compiled a unit using a newer version of the BDE, this sometimes will make other cooperating BDE methods work weird - sometimes not at all.

BUT, if you have been implementing your completely own object structure - using only own implemented sources without using anyting but standard constants, methods outside the objecthierachy (Like StrToInt() - System/SysUtils), objects without other inheritance but the TObject type as well as standard API methods (See windows.pas), you won't get in trouble! BUT be carefull, there are some methods of the API used changed by newer versions, which will outdate others - Expecialy if you are using VCL implementations.

SO, if you plan to do a better TForm object - without knowing which version to support - FORGET IT! ..that is:
1. stupid
2. born to be a total failure

...but if you plan to do a better implementation of StrToInt - My gues is, that you can expect this to work with delphi v. 1000.0 ...


Regards,
Williams
Avatar of jeurk

ASKER

Ok, that would be it.
thanks for your clean explanations
guys. Let's say that if you all agree
I'll give the points to Williams,
he typed more letters then you did. Just kidding ;)

Thanks again.
ASKER CERTIFIED SOLUTION
Avatar of williams2
williams2

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jeurk

ASKER

It's ok. It's because I only
give 30 points. It was to be sure.
Sometimes I asking a serie of question
just to confirm what I thought of.
To be sure ;)

Thanks for your comments all of you.

John.