[Lazarus] Imposible call DLL (dylib) in Mac OSX Lion
Sven Barth
pascaldragon at googlemail.com
Sat Aug 6 18:42:35 CEST 2011
On 06.08.2011 15:11, Juan Sánchez wrote:
> Hello,
> I'm going to start a new program in Lazarus based on Win32, Linux and
> Mac OSX. I'm making some previous test and I've found a problem. I write
> a DLL project and a Executable project. Executable project calls a very
> simple function in DLL. I cannot compile Exe project because a LD error
> in Mac. DLL (dylib) project compiles OK and with NM and OTOOL I can see
> function in OK.
>
> If I include in Exe project:
>
> function DllMessage(): Longint; stdcall; external 'project1';
>
> and:
>
> x:= DllMessage();
AFAIK you MUST add a "{$linklib project1}" on OS X if you want to use
"external".
Regards,
Sven
More information about the Lazarus
mailing list