Sugestion for compiling only parts of units. lazarus / 6-IDE-CodeTools ---------------------------------------------------------------------- Danail · 2007-03-14 19:49 I recently red an old book about the language Modula 2. In it you can declare which exactly functions and procedures will use and only they will be aded in the compiled code, except of the whole file. On that way the program becomes smaller. As far as I know the pascal languages include all of the text in the files listed in the section Uses. It will be a nice thing there to be an option or aplication comming with Lazarus that to compile only the functions and procedures that are used from the code, not all. ---------------------------------------------------------------------- felipemdc · 2007-03-14 20:36 That is not really true. Smartlinking is possible for quite some time now. Only it isn´t as efficient as we would like. AFAIK the implentation isn´t about single functions, but about code chunks, which can or not be added to the final executables, depending if they are used. A code chunk is a amount of code smaller then a unit, but may contain several functions. But then the compiler developers should know more about this then I.... for more low-level details it´s probably better to ask on the fpc mailling list. ---------------------------------------------------------------------- Vincent Snijders · 2007-03-14 22:01 In fpc, if you use the smartlinking option, and don't use a functionm or procedure from a unit, it will not be included. Keep in mind intializations sections are always used and that there might be some limitation about the smartlinking of virtual methods. ---------------------------------------------------------------------- Danail · 2007-03-17 17:42 I still didn't understand if I add a unit with 10 functions in my code, and use for example 4 of them, when I compile the project will the 10 functions be aded in the executable or only the 4 that I use. ---------------------------------------------------------------------- Vincent Snijders · 2007-03-17 19:08 Only the four that you use, if smartlinking is enabled (default on windows).