|Subject:||Re: Problems recompiling Indy|
|Posted by:||Remy Lebeau (TeamB) (email@example.com)|
|Date:||Thu, 19 Jan 2006|
"Ciaran Costelloe" <ccostell…@flogas.ie> wrote in message
> IdGlobal's WriteStringToStream gives a warning that LBytes
> might not have been initialised, which looks like it might be valid.
What does your copy of WriteStringToStream() look like? Mine looks like
procedure WriteStringToStream(AStream: TIdStream; const AStr :string);
if AStr = '' then Exit;
LBytes := ToBytes(AStr); // <-- always initialized!!
> Due to (good) rewrites in Indy, IdCoderTNEF won't compile because
> of TIdStreamVCL.
That's ok. I always meant to eventually post my own TNEF implementation
Seriously, though, not every component in Indy has been updated yet to not
use TIdStreamVCL anymore - and TIdStreamVCL was removed from Indy 10 a long
> Changing those declarations from TIdStreamVCL to TStream allows it to
Do not use TStream directly. Always use TIdStream instead, which maps to
the proper platform-specific Stream class (Tstream for the Win32 VCL).
> but gives warnings of "Constructing instance of 'TStream' containing
> 'TStream.Read'" and the same for 'TStream.Write'.
You cannot instantiate TStream directly, for exactly the reason you have
seen - it is an abstract base class. You must always use a descendant class
Problems recompiling Indy posted by Ciaran Costelloe on Wed, 18 Jan 2006