[fpc-pascal] A patched unit overriding the default - like Delphi supports

Graeme Geldenhuys graemeg.lists at gmail.com
Thu Jun 17 11:34:14 CEST 2010


Op 2010-06-17 11:13, Mattias Gaertner het geskryf:
> 
> If only the unit implementation changes, and you don't use inlines and
> you compile the unit with the same compiler flags, can this ppu be used
> instead of the original?


It worked!  For implementation sections bug fixes at least. :-)


Below is the output of "Lazaras IDE > Project Options > Show Options". Note
the -Fu/tmp/fixes which contained a new version of fpg_edit.pas. When I
compiled the project the original fpg_edit.o and fpg_edit.ppu inside
/home/graemeg/programming/fpgui/lib/x86_64-linux/ did not change, instead
the newer *.pas was compiled and its .ppu was created inside my projects
unit output directory - overriding the original.

 -MObjFPC -vewnhi @debug_build.cfg -Fi../ -Fu../ -Fucomponents/
-Fu/tmp/fixes/ -Fu/home/graemeg/programming/fpgui/lib/x86_64-linux/
-Fu/opt/lazarus/packager/units/x86_64-linux/
-Fu/home/graemeg/programming/3rdParty/tiOPF2/Source/Compilers/FPC/lib/x86_64-linux/
-Fu. -FUunits/x86_64-linux/ -FE../../Bin/x86_64-linux/ -otutoradmin
-dLINK_SQLDB_IB


So it works for external code (not included with FPC). I'll now try
replacing a FCL or RTL unit as see what happens. Though somehow I'm not as
optimistic as before. ;-)



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/




More information about the fpc-pascal mailing list