[fpc-devel]Last compiler source
Pavel V. Ozerski
pavel at insect.mail.iephb.ru
Tue Nov 28 14:10:23 CET 2000
Hello, I would make 2 messages:
Message 1:
There are exist a discrepancy between generation of public names in dlls by exporting and by importing (if they are not pointed
evidently using NAME keyword). By exporting they are converted to uppercase (like BP7 but not like Delphi32), by importing
they remain unchanged.
Message 2:
Next version of PAVEL_LINKLIB patches based on today's snapshot is done.
Leading underscores problem is solved. Now I can compile and link these examples:
1) UNIX-style "linking" of dlls:
{$linklib user32}
function MessageBoxA(x:longint;y,z:pchar;w:longint):longint;
external;
begin
MessageBoxA(0,'!','!',0);
end.
2) linking of static libraries (must be target-independed):
{$linklib 'libuser32.aw',static}
function MessageBoxA(x:longint;y,z:pchar;w:longint):longint;
external;
begin
MessageBoxA(0,'!','!',0);
end.
Import of functions is fully supported. Import of variables from dlls is also possible but with one restriction
(I see no suitable solutions): dlls export not the variables, but their addresses. Before linking the compiler
cannot "foretell", is this variable located in static library or in dll. Therefore external must be described not as
as variable but as a pointer to variable.
Rewritten are:
impdef.pas (not completely but essentially);
t_win32.pas (minor changes).
Also fpimpdef program is rewritten (now it must be compiled with -dSTANDALONE option!). It works also
as implib: creates static interface libraries for dlls (using asw and arw external utils).
I'm ready to send fixed units. Where must I send them? Is mailing list a suitable address?
More information about the fpc-devel
mailing list