Recent

Author Topic: Recomplile  (Read 402 times)

dfergfla

  • New Member
  • *
  • Posts: 42
Recomplile
« on: April 22, 2019, 07:50:42 pm »
Hey, newbie question...

So, when I install a new component into Lazarus I have to recompile the IDE.   I am just curious as to the reason for that?  I don't believe that other IDEs require the same.  I'm sure there is a reason, I just am curious to know what that is.

Thanks

Donald

Cyrax

  • Hero Member
  • *****
  • Posts: 740
Re: Recomplile
« Reply #1 on: April 22, 2019, 08:14:17 pm »
Lazarus doesn't have Delphi's support for dynamic packages (it is coming slowly, however) , so in order you to use a new component fully (see its icon at component palette, drop it to a form and change its properties at Object Inspector etc) you need to include its run able binary code to Lazarus itself. Thus you need recompile (and restart) whole IDE.

ASerge

  • Hero Member
  • *****
  • Posts: 1359
Re: Recomplile
« Reply #2 on: April 22, 2019, 08:27:35 pm »
I don't believe that other IDEs require the same. 
Lazarus comes in the source code. Therefore, it is easier to recompile the IDE at once than to bother with additional libraries. "Other IDEs", I believe, go without sources.

lucamar

  • Hero Member
  • *****
  • Posts: 1959
Re: Recomplile
« Reply #3 on: April 22, 2019, 09:38:06 pm »
Like Delphi, and unlike most other IDEs, Lazarus has (almost) Live-View of the form, controls, etc. in the designer: If, for example, you add a ShellTreeView to your form and change its Path property, the design view reflects this choice, as if the program were running.

The price of this is that the IDE has to be able to run the code of that control. Delphi does this by loading a special kind of DLL which is created when you compile/install the packages, so it doesn't need to recompile (which would be difficult, seeing that is released as binary-only).

Lazarus, though, doesn't (yet) supports these "dynamic packages" (as Cyrax said) so the only way for it to "run" a packages's code is to include it within itself, which can only be done by recompiling the whole IDE.

Most other IDEs don't have this "live-preview" feature, so they don't need to be recompiled. Note that there exceptions even here: some (badly designed) IDEs (don't ask me to name it) require a recompilation to use some plugin(s). Beter avoid those, though :)
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.2/2.0.4  - FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.

garlar27

  • Hero Member
  • *****
  • Posts: 597
Re: Recomplile
« Reply #4 on: April 23, 2019, 07:53:19 pm »
This is a Frequently Asked Question (which is not included in the FAQ) and from time to time someone ask it again.

In addition to what was writen above:
AFAIR, the Delphi model for packages is a no go for Lazarus because you need a specific package for every available Lazarus version _AND_ FPC version _AND_ bitness _AND_ platform _AND_ widget set. It looks like not a big deal but actually, IT IS A BIG PROBLEM.

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7305
Re: Recomplile
« Reply #5 on: April 23, 2019, 08:17:57 pm »
This is a Frequently Asked Question (which is not included in the FAQ) and from time to time someone ask it again.

In addition to what was writen above:
AFAIR, the Delphi model for packages is a no go for Lazarus because you need a specific package for every available Lazarus version _AND_ FPC version _AND_ bitness _AND_ platform _AND_ widget set. It looks like not a big deal but actually, IT IS A BIG PROBLEM.

For more background see http://wiki.freepascal.org/packages