[fpc-pascal] fp universal library ?
Fred van Stappen
fiens at hotmail.com
Sat Feb 1 15:59:36 CET 2014
Hello everybody.
Ok, i jump...
I decide to begin the conversion of a unit (wrapper to other libraries + lot of functions who link those libraries) into a universal fp library.
After Googling a while (and finding very poor doc, only few for Delphi, with always the hypra-simple same example...), i do not find how to do with classes...
Here a test (who gives me error)...
__________________________________________
library libtest;
uses
Classes, ctypes, Math, SysUtils;
type
TMyClass = class(TThread)
public
enabled1: boolean;
int1, int2: shortint;
function function1(): integer; cdecl;
end;
function TMyClass.function1(): integer; cdecl;
begin
if enabled1 then
result := int1 + int2 else result := -1;
end;
exports
TMyClass.function1();
end.
_______________________________________________________
Stop compil showing error at dot of function TMyClass.
=> libtest.pas(14,18) Fatal: Syntax error, ":" expected but "." found
PS : I promise, if i can do the conversion, to create a nice wiki, for dummies like me : "How to create a universal (complicated) library with fpc"...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140201/46383197/attachment.html>
More information about the fpc-pascal
mailing list