Ilya Zakharevich on Sun, 6 Apr 2003 12:53:11 -0700

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Cygwin + DLL

On Sun, Apr 06, 2003 at 05:31:00PM +0200, Karim BELABAS wrote:
> Hi developers,
>   I have downloaded a recent Cygwin version to try and build that ellusive
> libpari.dll, which has been periodically requested, and which I had been
> unable to build so far [ actually, I could get the DLL to build, but gp-dyn
> crashed ].

The recent Math::Pari build DLLs not only with Cygwin, but with mingw
and M$ cl as well.  So the simplest way out may be to modify the
export list (FUNCLIST of the toplevel Makefile.PL) so that the
resulting DLL works with gp-dyn.

> Also, install() works in gp-dyn, and the bench is about as fast as under
> Linux (DLL takes longer to load though).

Probably the opposite; just the skewed timing.  At least on OS/2, DLLs
are demand-loaded (a page is loaded only when needed; this includes
resolution of symbols); thus the load time of the DLL is included into
the timer output.  IIRC, on Linux the whole DLL is loaded first before
the timer starts.

The situation on Win32 may be similar.

> 1) install() does not work with gp-sta. install itself seems to behave
> correctly, but the DLL is apparently not properly loaded and gp-sta segfaults
> when calling the installed function [ later, it actually crashed XP... ].
> Since gp-dyn is (much smaller and) a little faster than gp-sta, it is not a
> major problem. I changed Configure to build gp-dyn.exe by default.

Did you create the export list for the EXE file?  [This does not work
on OS/2, so I can't be of more assistance; but this is reported to
work on Win32.]