develooper Front page | perl.perl5.porters | Postings from June 2013

Re: Include the Win32 extension in the ALL_STATIC build on Win32

Thread Previous | Thread Next
From:
Steve Hay
Date:
June 8, 2013 22:37
Subject:
Re: Include the Win32 extension in the ALL_STATIC build on Win32
Message ID:
CADED=K7g_CRvq+Fi=SdhO+V1V1xspDZLgm0iS+A+YQRiV9B58w@mail.gmail.com
On 8 June 2013 20:54, Konovalov, Vadim (Vadim)** CTR **
<vadim.konovalov@alcatel-lucent.com> wrote:
>> From: Steve Hay
>> So it seems that __declspec(dllexport) alone does work for an .exe but
>> not for a .dll!
>
> what a point of exporting functions from an .exe?
>
> while - executable could be managed to be working as either EXE or as DLL,
> I doubt that "perl-static.exe" is intended to be working as a shared library
> thus exporting anything.
>

Yes, but we have to export init_Win32CORE for the GetProcAddress()
call in Perl_init_os_extras() to succeed.

(Win32CORE is the means by which Win32 is loaded on-demand for certain
Win32::* Perl level functions for which a "use Win32;" is not
required. In this particular case, where Win32 itself is also
statically linked, it should not be necessary, but I've left it the
same as for the dynamic link case at the moment. I may revisit it to
tidy it up later, but Jan has already pointed out that it's hardly
worth the bother since the slight inefficiency involved is only on the
first such Perl function call and avoiding that may not justify the
extra code complication required.)

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About