[Lazarus] SdpoSerial port open problems

Michael Schnell mschnell at lumino.de
Fri Feb 11 09:38:50 CET 2011


On 02/10/2011 08:47 PM, Bo Berglund wrote:
>
> After a while I gave up because it looked like I would need more than
> 50% of the original files or maybe even all of them... :-(
>
> So it is not really possible to isolate just the port.
Of course this is not doable just on a file base. But I suppose you can 
delete some 90% of the code lines to get a working basic package.

I would do that with Delphi:

  - create a simple working example
  - so you know which files are necessary (you say some 50%)
  - look what active code gets actually lines get compiled in and "ifdef 
out" the code sequences that are not compiled.
  - locate the header definitions that are not necessary and "ifdef out"
  - locate the unit definitions that are not necessary and "ifdef out"
  - now supposedly you can remove some files
  - now there might be stuff that gets compiled because the code "might" 
use it, but from your project you do know that it will not happen. This 
can be "ifdef out" with a little bit more effort.

-Michael






More information about the Lazarus mailing list