[fpc-devel]FPC 1.0.8 - dont load many DLL
Zbigniew Kuczbanski
zbyszek at pixel.pl
Fri Jun 13 09:34:01 CEST 2003
----- Original Message -----
From: "Pierre Muller" <pierre at freepascal.org>
To: <fpc-devel at lists.freepascal.org>
Sent: Thursday, June 12, 2003 5:17 PM
Subject: Re: [fpc-devel]FPC 1.0.8 - dont load many DLL
> At 16:59 12/06/2003, Peter Vreman wrote:
> >At 08:55 12-6-2003, you wrote:
> >>Hi,
> >>I download new version FPC 1.0.8 (05-06-2003) from FTP for Win32.
> >>I need use FPC to create DLL for Win32 system and load many DLL in one
> >>apllication.
> >>
> >>And I have problem, because only fist DLL is load correctly. Next DLL I
cant
> >>load.
> >>Any sugestions?
> >
> >Here is no problem:
> >
> >C:\down>testdll
> >DLL1 is loaded
> >DLL2 is loaded
> I suspect that your problem does copme from some
> options that you use (options that might be hidden in your config file).
>
> By default all generated DLL get the same Image Base 0x10000000.
> Thus to be able to load two DLL compiled without specifying
> the ImageBase, you will need to generate relocatable DLLs.
>
> In order to get a relocatable DLL, you need to use -WR option,
> which is incompatible with debugging information
> (because the relocation process tried to relocate some values
> in the debugging sections, but fails to do that correctly
> and changes the relocation section itself..
> leading to an unsuable DLL).
>
> The other solution is to specify explicitly another ImageBase
> for the second DLL using
> -WB11000000 for instance.
Thanks, This work fine.
I heve suggestions, its possible to add this information to documentation,
for example in prog.pdf section "Programming shared libraries". This is VERY
important information for Win32 DLL.
Where I can find more information about anatomy of DLL ?
Best regards
Zbigniew Kuczbanski
More information about the fpc-devel
mailing list