It went all right with dynamic loading. "liknlib" gives me and error in linking time. So I think runtime loading of dll is better. What I don't know is what it's necessary rename functions with "_" at starting in Mac. Is it a bug? Regards. Juan.
It is not a bug. dlsym, the function used to find the address assumes C type of function names which are prefixed with _. Pascal doesn't prefix exported functions with _. See http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPa ges/man3/dlsym.3.html, down the page, notes. To make porting easier you can use the alias modifier with $ifdef like this: function DllMessage(): Longint; {$ifdef darwin} alias : '_DllMessage'; {$endif} ... exports DllMessage; This way, the function will be exported as _DllMessage on Darwin only, DllMessage on other platforms. Ludo
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
