Curtis cloud wrote: > I am having a problem with delphi recreating dcus files. I removed the > dcus from the directory, selected build all but delphi complains about > not being able to find dcu files for my pas files. > > Also, the syntax is not being checked within delphi. Is there a setting > in the IDE that tells delphi to turn off dcu recreation and turn off > syntax checking. > > I intentionally creating syntax errors but delphi still compiled find > without complaining.
The "search path" should hold only the directories that contain DCU files. It should _not_ include the directories that hold your project PAS files. The compiler can find your project files without any additional path information because the paths to those files are held in your DPR file. The search path should especially not include directories of the RTL and VCL source code. The "browsing path" should hold the directories where PAS files are. That's what lets the IDE take you to declarations of functions when you Ctrl+Click on their names. The "debugging source path" should hold the directories of the PAS files that correspond to any DCU files you want the debugger to have access to -- the files you want to be able to step through with F7. Frequently, the debugging path and the browsing path will be the same. I make use of the "DCU output directory." All my DCUs go into the same directory. That's all DCUs of all projects and all packages. The only exception is for the DCUs that came with Delphi; those continue to live in the $DELPHI\lib directory. Since all units that I compile go into the same directory, that keeps my search path very short. If the syntax isn't being checked, then that suggests that you're editing a different file from the one the compiler is finding. Make sure ou have exactly one copy of every PAS file you're working with. And make sure that all the units you're editing in conjunction with your project are actually members of the project. You shouldn't be letting the compiler compile anything that isn't a member of your project. -- Rob

