Hi,
Maybe a simpler question.
two unit:
Library foo;
uses
ctypes, math, func;
function GetEeprom(src: pcint32):cint; cdecl;
begin
GetEeprom := getsum(src);
end;
exports
GetEeprom;
begin
SetExceptionMask([exInvalidOp, exDenormalized, exZeroDivide, exOverflow, exUnderflow, exPrecision]);
end.
unit func;
interface
uses SysUtils, Variants, Classes;
function getsum(src:pointer):integer;
implementation
function getsum(src:pointer):integer;
begin
result := 88;
end;
end.
command line:
ppcx64-3.0.5 -Tiphonesim -XR/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk -Cn foo.pas -FU./sim -Fu./mysrc
Free Pascal Compiler version 3.0.5 [2017/11/26] for x86_64
Copyright (c) 1993-2015 by Florian Klaempfl and others
Target OS: Darwin/iPhoneSim for x86_64
Compiling foo.pas
Compiling ./mysrc/func.pas
func.pas(13,3) Error: Identifier not found "result"
func.pas(17) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
why the keywords of pascal ,"result" can not be identified?
Thanks for your help!
Best Regards,