Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Designintf.dcu not found in custom component

I am here converting some customize delphi component to latest delphi xe5. I already build it in delphi xe5 ide and where desgninf i replaced with designintf and design editor. i also include designide.dcp in reference . it build and install sucessfully . but there some packages while i try to use and complie error like designinf.dcu not found come .

i study on internet for solution as after delphi 6 their delphi not redistributed their design time packges. but because it in delphi 5 and complex one i can invest time on dividing design and runtime code and test it.

kindly any alternative solution.

thanks abhishek mestri

like image 486
Abhishek Mestri Avatar asked Jul 17 '14 14:07

Abhishek Mestri


2 Answers

For anyone that's having difficulty linking DesignIntf and/or DesignEditors, try adding designide.dcp to the package's Requires folder. For example, the dcp for XE3 can be found in:

C:\Program Files (x86)\Embarcadero\RAD Studio\10.0\lib\win32\release
like image 177
bvj Avatar answered Nov 10 '22 07:11

bvj


Such errors often happen if you take very old (Delphi 6 or before) component code and try to compile it in a newer compiler.

The unit designintf.dcu and some other units are only available to packages that link with the IDE, i.e. only for design time code. In older versions of Delphi, you would get the source code, but not anymore, because the packages in which these units are are not redistributable, they are exclusively meant for the IDE.

So at the time of Delphi 6 and 7, youw were warned to separate code that would be used at runtime and code that could only be used at designtime, by the IDE. The old component you are using did not do that, yet.

So try to find out which code actually requires designintf.dcu, move that code to a separate unit, and make it use the original unit. The original unit is now the runtime code, can be used everywhere, and doesn't need designintf.dcu. The other unit is the designtime unit and should only be linked into the package used to install the component in the IDE.

More info: Delphi FAQ

like image 30
Rudy Velthuis Avatar answered Nov 10 '22 09:11

Rudy Velthuis