Delphi (library path browsing path)

Source: Internet
Author: User

First, you must understand the concept of DCU files.

*. DCU is *. after the PAS is compiled, the unit file (Delphi compiled unit) is connected by the compiler to form an executable file *. EXE or *. DLL, which is equivalent to the OBJ file in C.
The agentobjects_tlb.dcu file you mentioned does not necessarily exist on your machine. It may be compiled
* In the BPL library file, it does not exist independently. Sometimes *. BPL is not reported when an error occurs in the IDE environment. Instead, it is reported as a component.

During compilation, if the source file has not been modified, it will not be re-compiled and the DCU file will be called directly. Therefore, some third-party components do not provide the PAS file to protect the code, and the value provides DCU, which can also be run.
However, if it is dependent on other units, it needs to be re-compiled and the PAS file is required.

Therefore, the library path is set by the compiler to find the path of the source file or DCU compiled file.
If no DCU exists, the PAS file is compiled and generated. If DCU exists and is not a build, DCU is directly used for connection.
(In the Registry, the name of library path is search path, and there is a search path in project-option. That search path is a project-level search path, the first one is system-level)

So what is browsing path set?
It is the path for the code browser to find the source code. setting this path does not affect the operation.
But it has another purpose: http://www.delphibbs.com/delphibbs/dispq.asp? Lid = 995504.

The raize component is used as an example.
Library path is D: \ Program Files \ Borland \ component \ raize. v4.02 \ RC4 \ Lib \ Delphi7
There are no PAS files, only DFM and DCU files.
Browsing path: D: \ Program Files \ Borland \ component \ raize. v4.02 \ RC4 \ Source
There are all DFM, pas, dpk files, but no DCU

It is clear that the purpose of doing so is to protect the PAS file from compilation after it is accidentally modified, without affecting the DCU file. However, you can freely browse the debugging source file.

The bin directory of raize stores BPL files. There are two design-time packages, which are used by known packages in IDE.
There is also a subdirectory system32, which contains two packages, namely the runtime package, which is copied to the system directory.

The same is true for Delphi organizations.
The lib directory contains DCU and no source code.
The imports directory contains the DCU of the imported space.
The bin directory contains BPL, DLL, and exe.
Projects \ BPL are all self-compiled BPL generated by third-party components
The source directory contains the PAS file, which is divided into multiple directory organizations.

Therefore, if you want to modify the Delphi Source Code (which is not encouraged), copy the PAS to the lib directory to generate a new DCU and overwrite the old one, for example:
Http://www.delphibbs.com/delphibbs/dispq.asp? Lid = 404099

How does delphi track data in a VCL file or a third-party control unit?
Http://www.delphibbs.com/delphibbs/dispq.asp? Lid = 2071839

How to Create a control Installer
Http://www.delphibbs.com/delphibbs/dispq.asp? Lid = 2053286

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.