create a library project A
there is a function like this:
function func(): Integer;stdcall;
begin
Result := 0;
end;
exports
func;
-------------------------------
create an application B
use code like:
var
func: function (): Integer;stdcall;
begin
func = GetProcAddress(LoadLirary ('/libA.dylib'), 'func');
if Assigned(func ) then
ShowMessage('func Assigned')
else
ShowMessage('func not Assigned')
end;
run & show "func not Assigned".
-------------------------------------------
if use cdcel instead of stdcall, will show "func Assigned"
-------------------------------------------
or, if change exports code like this:
exports
func name '_func';
also work!