• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 474
  • Last Modified:

is a .dcu compatible with all Delphi version

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 ;)
1 Solution
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.
jeurkAuthor Commented:
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.
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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 ...

jeurkAuthor Commented:
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.
Huh, I didn't expect my little 'lecture' to be your actual answer, as I felt you were in a middle of a discussion - but I'm happy to be at your position at any time, just feel free to ask at any time.


jeurkAuthor Commented:
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now