views:

144

answers:

2

I've just noticed that whenever I do an incremental compile (ctrl-F9) of any of my Delphi 2010 projects, all JEDI units referenced in my project are recompiling although they have not been changed in any way. In fact, if I create a new project, drop a JEDI control on the form and compile, I see all JEDI dependencies getting recompiled. If I think hit ctrl-F9 a second time without making any changes in my project, the same thing happens.

Anyone know what's causing this?

Update: The problem appears to be related to the subdirectory jvcl\run on my system. All units in this folder are getting recompiled each time I do a Delphi compilation (even without touching my project source). The compiled dcus are getting and left in this subdirectory on every compilation, even though the compiled dcus already exist in jvcl\lib\d14. I do not have jvcl\run on my library path.

Additionally, if I move the jvcl\run directory elsewhere on my hard disk my project compiles and links successfully, presumably finding the dcus in jvcl\lib\d14 (which is on my path).

+1  A: 

Sometimes you will see the unit name flash by on the compile progress screen, even when it is not being recompiled.

To know for sure, check the date of the Jedi DCU's before and after compile.

Also, how did you install the Jedi controls? If you use the default installer, then they shouldn't compile ever (they are compiled at install). If you just dropped all the source into your library path, then they will recompile on a build, or if they are changed (and various other conditions).

Jim McKeeth
The trick is indeed to leave the source out of the includepath, only precompiled dcu's. otherwise a change in defines or a touching of a sourcefile will force a recompile with .dcu's flying around everywhere (that will complicate subsequent compiles)
Marco van de Voort
I've had these controls installed for some time (months), without seeing this behavior. Checking my DCUs I see that all DCUs in jvcl\run show the date and time of my last compilation, three minutes ago. It's every unit in that subdirectory including some that I doubt are in any reference chain -- such as JvFormPlacement. All other subdirectories have the original installation date (11/19/2009).
Larry Lustig
@Marco: It's the units in jvcl\run that are recompiling, even though those units are pre-compiled in the jvcl\lib\D14 subdirectory. I have not recently made any changes to jvcl locations. jvcl\lib\D14 is in my library path; jvcl\run is not in my library path (but it *is* in my "browsing path"). Any suggestions?
Larry Lustig
Larry, the JVCL source directory should be in your *browsing path* and the JVCL DCU directory should be in your *search path*. Those two directories mustn't be a single folder. Always keep compiled files separate from source files. If you don't tell Delphi where the source is, then it won't try to compile it.
Rob Kennedy
@Larry, I am guessing you got the source files in your path somewhere.
Jim McKeeth
+1  A: 

There are a few placed to check for your "jvcl\run" path in your settings.

The first two:

  • Tools|Options
  • Environment Options|Delphi Options|Library-Win32
    • (1) "Library Path:" Edit Box
    • (2) "Debug DCU Path:" Edit Box

The Third is:

Open Your Project

  • Project | Options
  • Directories/Conditionals
  • (3) Search Path: Edit Box

And finally if you compile via the command line you need to check what you are passing in the DCC32.CFG and/or PROJECTNAME.CFG and the command line parameters to DCCC32.

The reason your compiled DCU's are getting placed in directory your source is in is because you have not set an "Unit Output Directory"

Robert Love