Using "exports" in a unit does not compile
Original Reporter info from Mantis: robert.gilland@basx.com.au
-
Reporter name: Robert Gilland
Original Reporter info from Mantis: robert.gilland@basx.com.au
- Reporter name: Robert Gilland
Description:
The below unit compiles in Delphi XE 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.
Steps to reproduce:
- use the unit in the description compile in Delphi XE. Good
- Same unit in FPC. Fatal: Syntax error, "IMPLEMENTATION" expected but "EXPORTS" found
Mantis conversion info:
- Mantis ID: 26173
- Version: 1.2.2
- Monitored by: » AntonK (Anton Kavalenka)