exports keyword incompatibility
Original Reporter info from Mantis: ivan17
-
Reporter name:
Original Reporter info from Mantis: ivan17
- Reporter name:
Description:
the following code sample compiles and works in delphi; does not compile in fpc. yes, the workaround is trivial, but i still think fpc should let me do that like delphi does.
-----dll code------------------
library project1;
{mode objfpc} {
H+}
uses Unit1;
begin
end.
--------unit code-------------
unit Unit1;
{mode objfpc}{
H+}
interface
function add(a, b: integer): integer;
function sub(a, b: integer): integer;
exports add, sub;
implementation
function add(a, b: integer): integer;
begin
Result := a + b;
end;
function sub(a, b: integer): integer;
begin
Result := a - b;
end;
end.
-------------------------------------------
Mantis conversion info:
- Mantis ID: 18030
- Platform: win32
- Version: 2.4.3
- Monitored by: » AntonK (Anton Kavalenka)