module project with bpl(s)

Please discuss general Delphi programming topics here.

module project with bpl(s)

Postby ibr_ozdemir » August 18th, 2008, 8:19 am

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
ibr_ozdemir
Member
Member
 
Posts: 3
Joined: August 18th, 2008, 8:07 am

Postby Kambiz » August 18th, 2008, 2:05 pm

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.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2421
Joined: March 7th, 2003, 7:10 pm

Postby ibr_ozdemir » August 18th, 2008, 3:20 pm

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
ibr_ozdemir
Member
Member
 
Posts: 3
Joined: August 18th, 2008, 8:07 am

Postby Kambiz » August 19th, 2008, 1:51 am

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.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2421
Joined: March 7th, 2003, 7:10 pm

Postby ibr_ozdemir » August 19th, 2008, 5:56 am

i already use unique names, i wrote unit1.pas because i had named my code as Turkish language
ibr_ozdemir
Member
Member
 
Posts: 3
Joined: August 18th, 2008, 8:07 am

Postby Kambiz » August 19th, 2008, 7:13 am

Maybe that's the problem.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2421
Joined: March 7th, 2003, 7:10 pm


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 2 guests

cron