Page 1 of 1

module project with bpl(s)

PostPosted: August 18th, 2008, 8:19 am
by ibr_ozdemir
hi everyone

i'm tring to build a project with bpls. There are couple of packages, here is the problem

*when i add a package to another package, it looks for the dcp file of the package (its ok i can live with that) but i think it causes a loading/removing package problem because i also need to load packages from code

*because of above problem i'm tring not to add package to another package, so i just add units of a package to another, in that case it says "cannot load package "package1.bpl" because it contain "unit1" which also contain in "package2.bpl"


anyway maybe i missunderstood module programming with delphi
can someone helpme please

PostPosted: August 18th, 2008, 2:05 pm
by Kambiz
From the menu select Projects > Options > Packages and then check Build with runtime packages checkbox.

In the editbox (located under the checkbox), list name of packages that you want to use as runtime.

No need to manually load a package.

That's all.

PostPosted: August 18th, 2008, 3:20 pm
by ibr_ozdemir
thanks, but when i do that it gives an error


let say i have a Package which name is "Package1" and it has a "Unit1" unit, when i compile the package it says :

[Error] Package1.dpk(37): Package 'Package1' already contains unit 'Unit1'

it doesn't make any sense to me because of course 'Package1' contains unit 'Unit1' , other way where am i going to put it?

note:if i connect 2 package together like Package2 and Package1, eachone contain eachother, that error appears

PostPosted: August 19th, 2008, 1:51 am
by Kambiz
Why you don't use a unique name for each package's unit?
Unit1 is not a good name because probably your form has also a unit named unit1.

PostPosted: August 19th, 2008, 5:56 am
by ibr_ozdemir
i already use unique names, i wrote unit1.pas because i had named my code as Turkish language

PostPosted: August 19th, 2008, 7:13 am
by Kambiz
Maybe that's the problem.