delphi编译DLL文件事报错Statement expected but 'FUNCTION' ..
delphi吧
全部回复
仅看楼主
level 1
jesseswangqq 楼主
library Max_Min_DLL;
{ Important note about DLL memory management: ShareMem must be the
first unit in your library's USES clause AND your project's (select
Project-View Source) USES clause if your DLL exports any procedures or
functions that pass strings as parameters or function results. This
applies to all strings passed to and from your DLL--even those that
are nested in records and classes. ShareMem is the interface unit to
the BORLNDMM.DLL shared memory manager, which must be deployed along
with your DLL. To avoid using BORLNDMM.DLL, pass string information
using PChar or ShortString parameters. }
uses
SysUtils,
Classes;
{$R *.res}
begin
function Max(x,y,z:Integer):Integer;stdcall;
var
t:Integer;
begin
if (x>y)then
t:=x
else
t:=y;
if (t<z) then
t:=z;
max:=t;
end;
function Min(x,y,z:Integer):Integer:stdcall;
var
t:Integer;
begin
if (x<y)then
t:=x;
else
t:=y;
if (t>z)then
t:=z;
min:=t;
end;
exports
Max,Min;
//xports
// Max(x,y,z:integer) Name 'MaxInt';
// Max(x,y,z:Real) Name 'MaxReal';
end.
2015年10月05日 03点10分 1
level 1
jesseswangqq 楼主
哪位大神能指点一下啊,,
2015年10月05日 03点10分 2
level 13
把第一个begin放到最后一个end前面
2015年10月05日 06点10分 3
[笑眼]非常感谢
2016年01月13日 14点01分
level 14
看书去吧,语法错误。
2015年10月06日 01点10分 4
level 9
同意楼上说的,还是再多看看书
2016年01月14日 01点01分 5
1