Recent

Author Topic: What units in a package are linked?  (Read 3009 times)

eny

  • Hero Member
  • *****
  • Posts: 1588
What units in a package are linked?
« on: February 23, 2010, 10:49:26 am »
When a non-designtime package is created with let's say 20 units, and only one of the units is used in a program (the units are autonomous, so no other dependencies).
Will all 20 units be linked into the resulting program?
Or only the actually used unit(s)?

The wiki page on packages explains a lot but not this particular question.
All posts based on: Win10 (Win64); Lazarus 1.8.0 'stable' (#56594 win64) unless specified otherwise...

Leledumbo

  • Hero Member
  • *****
  • Posts: 8143
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: What units in a package are linked?
« Reply #1 on: February 23, 2010, 02:16:34 pm »
Only used units, and if you enable smartlinking, only used variables and routines are linked.

eny

  • Hero Member
  • *****
  • Posts: 1588
Re: What units in a package are linked?
« Reply #2 on: February 23, 2010, 05:33:04 pm »
Thx for the update.
Now I have no more excuses for not using packages   :)
All posts based on: Win10 (Win64); Lazarus 1.8.0 'stable' (#56594 win64) unless specified otherwise...