0

I was using Delphi xe4 to compile https://github.com/hprose/hprose-delphi/blob/master/Test/HproseTest.dpr

And got the following error which I spent tens of minutes and still couldn't figure out why.

I've tried deleting all 'DUnitX*.dcu" and compile again, with no luck.

What puzzled me is that, why the unit TextTestRunner from DUnit (born first) relies on a unit from DUnitX which was born later?

Any hint? Thanks.

[dcc32 Fatal Error] HproseTest.dpr(37): F2051 Unit TextTestRunner was compiled with a different version of DUnitX.TestFramework.ITestListener

And here is the screenshot I made for making the problem description clear: enter image description here

Edwin Yip
  • 4,089
  • 4
  • 40
  • 86

1 Answers1

0

I downloaded the repository and it was compiling on the first try but i only have Delph XE8. But i found out that there is a unit called TestFramework.pas in DUnit and DUnitX. While TextTestRunner relies on DUnit, it can only find DUnitX's unit. So, I think you should check your Delphi librarypath.

MxNbrt
  • 317
  • 3
  • 12
  • Thanks for the help @MxNbrt. The one I found in the DUnitX folder is `DUnitX.TestFramework.pas` (note the `DUnitX.` prefix), so I guess it's not the same? – Edwin Yip Nov 17 '17 at 03:31
  • I compared them and they have literally nothing in common. So you definitly need the Testframework.pas of DUnit – MxNbrt Nov 17 '17 at 10:08
  • Delphi often adds DUnitX to its unit scope names. That is why it then finds `TestFramework` in a uses in the file `DUnitX.TestFramework.pas` – Stefan Glienke Jun 12 '18 at 07:48