Recent

Author Topic: Using Compile Units  (Read 1170 times)

StephenMilner

  • New Member
  • *
  • Posts: 15
Using Compile Units
« on: January 17, 2022, 04:01:41 pm »
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

  • Hero Member
  • *****
  • Posts: 2319
Re: Using Compile Units
« Reply #1 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)
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

StephenMilner

  • New Member
  • *
  • Posts: 15
Re: Using Compile Units
« Reply #2 on: January 17, 2022, 04:12:50 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)

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

 

TinyPortal © 2005-2018