Tech Notes
Tech Notes |
How to tell a Delphi 2009 ("D12") project to find resource (*.res) files
Symptom
When compiling a WebHub application (or any other Delphi application) in Delphi 2009, you may receive an error that the compiler can not find a resource file, e.g. combob32.res or any other .res files. When you look on disk, you find the file (e.g. webhub\lib\combob32.res) AND when you look in Project > Options, you can see that path on the search list. Nonetheless the compiler does not find the resource.
In earlier versions of Delphi, the "Search path" project setting was saved in DCC_UnitSearchPath, DCC_ResourcePath, DCC_ObjPath and DCC_IncludePath of .dproj file.
Workaround
If you add the DCC_ResourcePath into the DPROJ file manually, it is respected by the D12 compiler. There appears to be no way to use the D12 GUI to make this entry.
Example
Example project: whLite.dpr Use notepad to edit whLite.dproj : <PropertyGroup Condition="'$(Base)'!=''"> <DCC_UnitSearchPath>D:\Apps\HREFTools\WebHub\lib;D:\Apps\HREFTools\WebHub\lib\D12;D:\Apps\HREFTools\WebHub\lib\PKGD12;$(DCC_UnitSearchPath)</DCC_UnitSearchPath> <DCC_ResourcePath>D:\Apps\HREFTools\WebHub\lib;$(DCC_ResourcePath)</DCC_ResourcePath> </PropertyGroup>
Quality Central Reference
CodeGear Quality Central issue 66459.
Running DynHelp.exe v1.2.0.6 on WebHub-v2.125 built by D14
Calc time: 140 ms

