Maybe the compiler could hide the procedurization/re-object-orientation, thus making interfacing easier.
So this: type User = class public function Sum(a, b: cint): cint; cdecl; external 'cpplib.dll'; end; Would be the exact equivalent of: function User_Sum(Self: Pointer; a, b: cint): cint; cdecl; external 'cpplib.dll' name '_ZN4User3SumEii'; type User = class private InternalHandle: Pointer; public function Sum(a, b: cint): cint; cdecl; end; function User.Sum(a, b: cint): cint; begin Result := User_Sum(InternalHandle, a, b); end; -- Felipe Monteiro de Carvalho _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel