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

Re: dmake can't find config.h, and collector throws error when tryingto compile perl-static.exe (perl-5.18.0 / mingw / 32b)

Thread Previous | Thread Next
From:
Jan Dubois
Date:
June 7, 2013 00:26
Subject:
Re: dmake can't find config.h, and collector throws error when tryingto compile perl-static.exe (perl-5.18.0 / mingw / 32b)
Message ID:
CAD-TLz_yOmgCuy91t3F_5-WWDa3mYmj0SJAHS81baTjw4hmwOA@mail.gmail.com
On Thu, Jun 6, 2013 at 5:17 PM, Steve Hay <steve.m.hay@googlemail.com> wrote:
> I made a debug build of it and stepped into Perl_init_os_extras. The
> 'module' variable is set to something sensible, but 'pfn_init' comes
> back NULL. It's unusual to call GetProcAddress on an .exe. I believe
> it should work, but I think the function needs to be exported from the
> .exe? It currently isn't (only a few PerlIO_* functions,
> Perl_win32_init/term, RunPerl and numerous win32_* functions are,
> according to dumpbin /exports), so I'll have to look at that; not sure
> where the best place to arrange for it is at the moment.

Yes, init_Win32CORE is normally exported from perl5xx.dll.  There is
support for it in makedef.pl.

There should be no problem in exporting symbols from an .exe.

> There is one other thing in DllMain()'s
> DLL_PROCESS_ATTACH case which is missing from Perl_init_os_extras():
>
> #ifndef UNDER_CE
>     DisableThreadLibraryCalls((HMODULE)hModule);
> #endif
>
> Is that relevant at all?

No, it just disables the OS from calling DllMain with
DLL_THREAD_ATTACH/DETACH messages each time a thread is
created/destroyed.  So it is only an optimization, and doesn't apply
at all if your code doesn't reside in a DLL.

Cheers,
-Jan

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