[Lazarus] Imposible call DLL (dylib) in Mac OSX Lion
Juan Sánchez
aldeacity at gmail.com
Sat Aug 6 15:11:04 CEST 2011
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();
I get:
ld: symbol(s) not found for architecture i386
Error: Error while linking
at compiling.
I've tried with GetProcedureAddress (adapting code) and LoadLibrary loads
the library but GetProcedureAddress returns nil.
Function in DLL is very simple:
function DllMessage(): Integer;
begin
Result:= 1;
end;
I would like someone could help me.
Thanks a lot.
Best regards,
Juan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110806/339dd4c9/attachment-0002.html>
More information about the Lazarus
mailing list