Forum > Beginners
Using "exports" in a unit does not compile
Robert Gilland:
The below unit compiles in Delphi but fails in FPC with the following error:
Fatal: Syntax error, "IMPLEMENTATION" expected but "EXPORTS" found
Why?
Kind Regards,
Robert.
unit testexports;
{$IFDEF FPC}
{$MODE Delphi}
{$ENDIF}
interface
uses Classes, SysUtils;
function GetTestExport( id_ws : Integer; strwsList : string; procfilescreated : TGetStrProc ): Boolean; stdcall;
exports GetTestExport;
implementation
function GetTestExport( id_ws : Integer; strwsList : string; procfilescreated : TGetStrProc ): Boolean;
begin
// do something
end;
end.
Leledumbo:
Because it's syntactically incorrect, unit never has exports section, only library does. What Delphi version? Can you confirm with newer ones (XE family)?
Robert Gilland:
This unit compiles perfectly well in Delphi XE
Kind Regards,
Robert.
Leledumbo:
--- Quote from: Robert Gilland on May 09, 2014, 02:20:19 am ---This unit compiles perfectly well in Delphi XE
Kind Regards,
Robert.
--- End quote ---
Please file a Delphi compatibility bug report.
Robert Gilland:
Could you put the link to where to do this in here?
Navigation
[0] Message Index
[#] Next page