<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.6000.16544" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Tahoma size=2><BR></FONT> </DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<P>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?<BR>Regards.<BR>Juan.</P></BLOCKQUOTE>
<DIV class=gmail_quote dir=ltr><SPAN class=812533917-07082011><FONT face=Arial
color=#0000ff size=2>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 <A
href="http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man3/dlsym.3.html">http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man3/dlsym.3.html</A>,
down the page, notes.</FONT></SPAN></DIV>
<DIV class=gmail_quote dir=ltr><SPAN class=812533917-07082011><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV></BLOCKQUOTE>
<DIV class=gmail_quote dir=ltr><SPAN class=812533917-07082011><FONT face=Arial
color=#0000ff size=2><SPAN class=890300518-07082011>To make porting easier you
can use the alias modifier with $ifdef like this:</SPAN></FONT></SPAN></DIV>
<DIV class=gmail_quote dir=ltr><SPAN class=812533917-07082011><FONT face=Arial
color=#0000ff size=2><SPAN
class=890300518-07082011></SPAN></FONT></SPAN> </DIV>
<DIV class=gmail_quote dir=ltr><SPAN class=812533917-07082011><FONT face=Arial
size=2><SPAN class=890300518-07082011><FONT color=#0000ff>function DllMessage():
Longint; </FONT><FONT color=#0000ff>{$ifdef darwin} alias : '_DllMessage';
{$endif}</FONT></SPAN></FONT></SPAN></DIV>
<DIV class=gmail_quote dir=ltr><SPAN class=812533917-07082011><FONT face=Arial
color=#0000ff size=2><SPAN
class=890300518-07082011>...</SPAN></FONT></SPAN></DIV>
<DIV class=gmail_quote dir=ltr><SPAN class=812533917-07082011><FONT face=Arial
color=#0000ff size=2><SPAN class=890300518-07082011>exports
DllMessage;</SPAN></FONT></SPAN></DIV>
<DIV class=gmail_quote dir=ltr><SPAN class=812533917-07082011><FONT face=Arial
color=#0000ff size=2><SPAN
class=890300518-07082011></SPAN></FONT></SPAN> </DIV>
<DIV class=gmail_quote dir=ltr><SPAN class=812533917-07082011><FONT face=Arial
color=#0000ff size=2><SPAN class=890300518-07082011>This way, the function will
be exported as _DllMessage on Darwin only, DllMessage on other
platforms.</SPAN></FONT></SPAN></DIV>
<DIV class=gmail_quote dir=ltr><SPAN class=812533917-07082011><FONT face=Arial
color=#0000ff size=2><SPAN
class=890300518-07082011></SPAN></FONT></SPAN> </DIV>
<DIV class=gmail_quote dir=ltr><SPAN class=812533917-07082011><FONT face=Arial
color=#0000ff size=2><SPAN
class=890300518-07082011>Ludo</SPAN></FONT></SPAN></DIV></BODY></HTML>