[fpc-pascal] Exporting pointers to classes or objects

L505 fpc505 at z505.com
Sun Jul 24 23:32:13 CEST 2005

Questions on returning a pointer to a class with regards to DLL/SO's (exporting

(I realize you can't export a class yet for FPC)

Would returning a pointer to a class (either through a function result, or a
function Var (by reference) parameter) allow you to use classes across module
boundaries (library/executable).

 I am going to experiment with this, but even if it works in some odd way, I of
course want to know if it would be reliable or just hit and miss.

Would a pointer be more efficient or roughly the same in comparison to exporting

Also, are classes from FPC different binary constructs than the classes from
Delphi?.. so you wouldn't be able to use a exported pointer or exported class in
a Delphi program from an FPC library?


More information about the fpc-pascal mailing list