[fpc-devel]buggy Win32 DLLs smart linking

Pavel V. Ozerski pavel at insect.mail.iephb.ru
Thu Nov 16 08:52:37 CET 2000


Hello,
May be, this problem is already known, but just in case I would inform you: in Free Pascal Compiler version 1.0.2 [2000/10/12]
smartlinked Win32 DLLs don't contain export info. Example:

library test1;
procedure proc1;export;
 begin
  writeln(1);
 end;
procedure proc2;export;
 begin
  writeln(2);
 end;
exports
 proc1 name 'proc1',
 proc2 name 'proc2';
begin
end.

commands:
Variant A: non-smart linking

ppc386 test1.pp
fpimpdef -i test1.dll -o deffile.txt

deffile.txt will be successfully created and contain lines:

EXPORTS
proc1=proc1
proc2=proc2

Variant B: smart linking
ppc386 test1.pp -CX -XX
fpimpdef -i test1.dll -o deffile.txt

fpimpdef gives a message:
Export names not found

Although using smart linking for main modules is not so important as for units, it can also be useful to
exclude non-used variables and functions. Therefore if this problem in the compiler is now not solved, it
must be solved!

Pavel





More information about the fpc-devel mailing list