Forum > General

Using Compile Units

(1/1)

StephenMilner:
Hi.

When I build a project I want to be able to include a unit that has been compiled, rather than the source .pas file.

I guess I create a directory and put the .o and .ppu files for the unit into the directory and make sure the compiler has path to the directory.

What happens to the project executable?

Does the project executable compile and add the code into the project executable, or does the project executable need to be able to find the .o and .ppu files at runtime?

Basically I'm hoping to build a suite of units, compile them and have individual applications use the compiled unit code (in a path that can be found in a deployment) giving some advantages:

1) Total code size of the projects will be smaller as each unit will only be there once.
2) Changes to the units routines can be compiled and deployed without having to re-compile all the projects (assuming parameters/types etc. remain the same).

Thanks,
Stephen

Zvoni:
I think you're confusing it with libraries.
Going by your descriptions in 1) and 2) you're talking about Libraries (Window-speak: DLL's)

StephenMilner:

--- Quote from: Zvoni on January 17, 2022, 04:04:30 pm ---I think you're confusing it with libraries.
Going by your descriptions in 1) and 2) you're talking about Libraries (Window-speak: DLL's)

--- End quote ---

I think you might well be correct - I'll research libraries....

Navigation

[0] Message Index

Go to full version