Using "exports" in a unit does not compile lazarus / 61-Beginners ---------------------------------------------------------------------- Robert Gilland · 2014-05-08 23:42 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 · 2014-05-09 00:18 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 · 2014-05-09 00:20 This unit compiles perfectly well in Delphi XE Kind Regards, Robert. ---------------------------------------------------------------------- Leledumbo · 2014-05-09 06:17 Quote from: Robert Gilland on May 09, 2014, 02:20:19 amThis unit compiles perfectly well in Delphi XE Kind Regards, Robert. Please file a Delphi compatibility bug report. ---------------------------------------------------------------------- Robert Gilland · 2014-05-12 02:05 Could you put the link to where to do this in here? ---------------------------------------------------------------------- Leledumbo · 2014-05-12 15:29 Quote from: Robert Gilland on May 12, 2014, 04:05:19 amCould you put the link to where to do this in here? Left menu of this forum->bugtracker ---------------------------------------------------------------------- Robert Gilland · 2014-05-15 22:43 New issue at http://bugs.freepascal.org/view.php?id=26173