Re: Lost !



Thank you for your help ! For the momnent I've configured Delphi as follows:
Menu Tools / Options:
System Variables:
.........................
$BDSCOMMONDIR C:\Users\Public\Documents\RAD Studio\5.0
$BDSUSERDIR D:\Documenti\RAD Studio\5.0
_________________________________________________________
User Overrides for BDSCOMMONDIR and BDSUSERDIR
E:\Delphi 2007\Lib
---------------------------------------------------------
Package output directory: $(BDSCOMMONDIR)\Bpl ( given the overrides, I expected this to be E:\Delphi2007\Lib\Bpl)
DCP output directory: $(BDSCOMMONDIR)\Dcp
---------------------------------------------------------
I left the Project Options completely blank.

With this configuration, I tried rebuilding the package that contains all of my components, but they went created in C:\Users\Public\Documents\RAD Studio\5.0 and not in the overridden folder E:\Delphi2007\Lib\Bpl.

I don't understand why. So I forgot the overrides (though I left it there) and put directly my folders as follows:
Package output directory: E:\Delphi2007\Lib\Bpl
DCP output directory: E:\Delphi2007\Lib\Dcp
I added to the Libray path:
- the path to the package source (to allow the compile and build of the package)
- the path $COMMONDIR\Dcp (the compile of my application failed since it couldn't find .dcr and .res files ??)

I deleted the .dcp, .bpl and .dcu files and I rebuild the package. The .bpl and .dcp went into my folders, while the .dcu went into the folder of the package source. Now I went back to my apllication and tried to recompile. It did it correctly !

So for the moment, I am not desparate any more.. But I am far from understanding it all.
May I ask you a few questions with my next message ?


"Rob Kennedy" <me3@xxxxxxxxxxx> ha scritto nel messaggio news:7j2e7tF326nokU1@xxxxxxxxxxxxxxxxxxxxx
Stark wrote:
Movements.pas is a form;

No, it's a file. A source code file for a Delphi unit. Perhaps you define a form class in that file, but the the file is a file, not a form.

this form contains the component FJCalculator which contains FullEditC.

Given the error message, I think FullEditC is another Delphi unit. Components can't contain units.

If what you suppose is true, I have these questions:
- how should I correct the problem ?

Make sure both units are in the same package, and that you have exactly one copy of each .pas file and exactly one copy of each .dcu file on your computer. If you find extras, delete them.

- What I should do to have FJCalculatorForm use a correct version of FullEditC ? Re-compile the package ? (I already did so, but .dcp e .bpl went in the wrong folder (see my previous message)

Then fix your package's configuration. Change the "DCP output folder" and "Output folder" settings in the project options. The DCP output folder should be on your *other* projects' "search path." The folder where your source code is should *not* be in *any* search path. The package that contains those source files should be the *only* project that ever compiles those units.

- Faking a change in the FullEditC.pas component re-creates the .dcu file. But why in the wrong folder ?

Your "Unit output directory" setting is set wrong.

And why the . bpl and .dcp files do not get created ?

You're compiling that unit via another project instead of via the package that owns the unit. To prevent that, make sure your package source code is *not* on any other project's search path, and make sure that no package's unit source files are members of any other projects. Each unit should belong to exactly one project.

- Yesterday night I had the same problem. Compilation went in the wrong folders first, then after a while Delphi took knowledge of the overrides and the application compiled correctly ? You exclude a problem with Delphi 2007 ?

As far as I know, the advice I've given above is valid for all 32-bit Delphi versions.

PS: Another thing I observe compiling the application containing Movements and the rest is that, while the compilation fails, nevertheless I find a new FullEditC.dcu file created (which is abnormal, since this is part of the package containing FJCalculatorForm and should be recreated only if something has changed). Does this suggest you anything ?

Yes. That's *why* you're seeing the errors. You're recompiling Movements, but you're not recompiling FJCalculatorForm. FJCalculatorForm expects to use the previous version of Movements, but you're providing a new version.

--
Rob

.



Relevant Pages

  • Re: Lost !
    ... I think FullEditC is another Delphi unit. ... Make sure both units are in the same package, and that you have exactly one copy of each .pas file and exactly one copy of each .dcu file on your computer. ... and "Output folder" settings in the project options. ... The folder where your source code is should *not* be in *any* search path. ...
    (comp.lang.pascal.delphi.misc)
  • Re: TComPort
    ... Sounds to me like package and/or code trouble... ... Maybe there is some code which checks if it's on windows 2000, ... It's the folder where the BPL's get stored... ... I've been in and "cleaned" out Delphi on the XP machine, ...
    (alt.comp.lang.borland-delphi)
  • Delphi Package design flawed ?
    ... Delphi adds the folder of the installed Package to the library path. ...
    (alt.comp.lang.borland-delphi)
  • Re: FastMM and Delphi 2006
    ... > 1) Should I only copy the BorlndMM.dll from the latest version of FastMM ... > package to Window\System32 folder so to make the Delphi 2006 work with the ... The borlndmm.dll is inside the \bin folder of your Delphi installation. ...
    (borland.public.delphi.language.basm)
  • Re: Music stops playing in PowerPoint 2003 slideshow
    ... slideshow. ... The linked music files are included in the package. ... copy any presentation to the folder, make the name change in the playlst ... I changed the effect options to "Stop playing after 999 slides," ...
    (microsoft.public.powerpoint)