: Hi,
:
: I'm using Borland Pascal 7.0 and I made a test DLL called "minmax.dll". Now I wanted to import functions from it. The code looks like this:
:
:
: program _minmax;
:
: function min(x, y: longint): longint; external 'minmax';
: {^}{Error 85: ";" expected}
:
: begin
: end.
:
:
: What's wrong??? I made it by the BP's help. By the way, "minmax.pas" looks like this:
:
:
: library minmax;
:
: function min(x, y: longint): longint; export;
: begin
: if x < y then min := x
: else min := y;
: end;
:
: function max(x, y: longint): longint; export;
: begin
: if x > y then max := x
: else max := y;
: end;
:
: exports
: min,
: max;
:
: begin
: end.
:
:
: And I've also compiled it (for protected mode of course). With QuickView the DLL is OK.
:
NetGert[/italic]
:
Before the word external BP expects the word far; Then it can recognize the statement as a declaration for a DLL import. See online hep on external for more info.