[fpc-devel] RTTI for ProcVar types

Steve Hildebrandt Steve.Kassel at web.de
Wed Mar 20 21:45:19 CET 2013


Hi,

since i needed RTTI for ProcVar types i just added this to the compiler.
Following example works just fine :

uses typinfo;

type TFoo = procedure(bar : byte) of object;

var pInfo : PTypeInfo;
      pData : PTypeData;

begin
    pInfo := TypeInfo(TFOO);
    pData := GetTypeData(pInfo);

    with pInfo^ do
      writeln('Kind: ', kind, ' Name: ', name);

    with pData^ do
      writeln('MethodKind: ', MethodKind, ' ParamCount: ', ParamCount);

    readln;
end.

The only problem, that has occured is projects using JPEGLIB produce the
following errors :
Error: Undefined symbol: RTTI_$JPEGLIB_$$_DEF104
Error: Undefined symbol: RTTI_$JPEGLIB_$$_DEF150

Any ideas what could cause this? (I only modified ncrtti.pas and 
typeinfo.pp)

mfg Necem



More information about the fpc-devel mailing list