5

I'm currently involved in a Delphi XE5 project and I'm facing a problem that I could not solve. I have a Delphi project group that conists of one EXE; this EXE loads multiple runtime BPL's dynamically. These BPL's are also part of the project group. However, when I run the application, I got the error 'Project {MyProject.exe} raised exception class EPackageError with message 'Cannot load package 'PumpMethod'. It contains unit 'FlEdit', which is also contained in package 'eXtractionUnitMethod'.

I already searched on SO, and I've found the cause. Especially Is "implicitly imported" always a bad thing in Delphi packages? was of big help. During compilation, both BPL's of my project, emit the following message:

[dcc32 Warning] PumpMethod.dpk(46): W1033 Unit 'FlEdit' implicitly imported into package 'PumpMethod'

Other one as well:

[dcc32 Warning] eXtractionUnitMethod.dpk(46): W1033 Unit 'FlEdit' implicitly imported into package 'eXtractionUnitMethod'

But the point is that FlEdit, a textbox control that allows only the input of floats, is already part of an installed package. This package, 'Spark190.bpl', contains the control, and thus also the FlEdit unit. I've registered it and the control appears on the Tool palette. This is the project with the control:

enter image description here

There is also a project DclSpark190.bpl, but that is a design time package (contains the registering of the controls). When I close this project group and create a new one, I can drag/drop 'My float edit' on a form, and this runs all fine.

When I now open the project group with the EXE, and build the BPL's I got this message:

enter image description here

This again seems okay for me. The Spark package (with the FlEdit) is now included in the 'requires' list:

enter image description here

But when I compile again, the 'the following changes...' is shown again. That looks abnormal to me; the Spark BPL is already included in the requires list? So:

Q1: Why is that happening? Is it a bug in Delphi XE5? Do I something wrong here?

Also, the 'FlEdit' implicitly imported into package 'PumpMethod' is still not away:

enter image description here

So:

Q2: I think I've put FlEdit in a separate package 'Spark'. Both BPL's contain 'Spark' in the required package list, but still the warning (W1033) is shown. What else can I do?

Community
  • 1
  • 1
Sjips
  • 1,248
  • 2
  • 11
  • 22
  • 1
    Is there a extra reference to FlEdit in SparkUtils or another package that you are using in eXtractionUnitMethod? – Graymatter Oct 28 '14 at 17:17
  • Thanks for your suggestion. Tomorrow when I'm in the office I will check it. – Sjips Oct 28 '14 at 18:33
  • I've checked it - yes, there are but they are also including the Spark runtime package in the required packages list. That seems to be okay, right? – Sjips Oct 29 '14 at 15:54

0 Answers0