Jump to content
Registration disabled at the moment Read more... ×
Dmitry Onoshko

Component installation and paths

Recommended Posts

I might be missing something pretty simple, but I feel the need to finally understand the whole thing. I have some (limited) experience of component creation in D7 (a few simple GUI controls), but I have trouble doing the job in D12.

 

I create a DPK with a new component derived from TCustomControl and install the package. Then I start a new project and put an instance of the control onto the form. It works in design-time (like, say, repaints correctly when changing the inherited Color property from the Object Inspector) but when I try to compile the program, I get a “file not found” error pointing to a .pas with the control. Google says one might manually add an appropriate folder to the Library path in IDE, but I feel there should be a way to make IDE do it automatically on component (package) installation. At least I can’t remember having the same trouble with D7.

 

Can anyone point me to or provide a good explanation (related to paths and stuff) of the whole ecosystem and best practices? (Information on D12 IDE some-level-support for 64-bit components is also appreciated.)

Share this post


Link to post
5 hours ago, Dmitry Onoshko said:

I feel there should be a way to make IDE do it automatically on component (package) installation.

There isn't.

 

You can do one of either:

  1. Add the path of the component source to the global library search path:
    Tools->Options->Language->Delphi->Library path
  2. Add the path of the component source to the project library search path:
    Project->Options->Building->Delphi compiler->Search path

In general I would recommend #2 and, if possible, try to keep the path relative to the project.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×