in reply to Re: perlxs and c++ : dosish.h(111) : warning C4005: 'Stat' : macro redefinition (debug)
in thread perlxs and c++ : dosish.h(111) : warning C4005: 'Stat' : macro redefinition

I have seen that, but didn't conclude that "so it appears that win32.h expects to be included after dosish.h.".

From what I can gather by examining perl.h , it is being included after.

Thats still my impression after inspecing Compress.i (produced by -P with -C). You can get it at http://crazyinsomniac.perlmonk.org/perl/misc/Coordinate.i.bz2 if you wanna take a peek.

So I looked up C2146 and ran into C2065 (missed it before), and under MSDN, some of the more notable tips were

Make sure any include file containing the required declaration is not omitted.

Make sure you are including any necessary header files if you have defined VC_EXTRALEAN, WIN32_LEAN_AND_MEAN, or WIN32_EXTRA_LEAN. Defining these symbols excludes some functionality (certain header files are excluded) from windows.h and afxv_w32.h (for MFC applications) to speed compiles. Search windows.h and afxv_w32.h for these symbols for the most up-to-date description of what is excluded.

win32.h does define WIN32_LEAN_AND_MEAN. And WINDOWS.H does have
#ifndef WIN32_LEAN_AND_MEAN #include <cderr.h> #include <dde.h> #include <ddeml.h> #include <dlgs.h> #ifndef _MAC #include <lzexpand.h> #include <mmsystem.h> #include <nb30.h> #include <rpc.h> #endif #include <shellapi.h> #ifndef _MAC #include <winperf.h> #if(_WIN32_WINNT >= 0x0400) #include <winsock2.h> #include <mswsock.h> #else #include <winsock.h> #endif /* _WIN32_WINNT >= 0x0400 */ #endif #ifndef NOCRYPT #include <wincrypt.h> #endif #ifndef NOGDI #include <commdlg.h> #ifndef _MAC #include <winspool.h> #ifdef INC_OLE1 #include <ole.h> #else #include <ole2.h> #endif /* !INC_OLE1 */ #endif /* !MAC */ #endif /* !NOGDI */ #endif /* WIN32_LEAN_AND_MEAN */
But this is largely a dead end.

update: I have also posted this as a question over at the Extending And Embedding forum as Compiling ExtEmbPerlSrc_v0_90/chap6/6.8.1 on Win32 in hopes the authors will be able to help out.

Maybe later (if i don't figure it out) i'll inquire on one of the mailing lists as well (maybe p5p).


MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
I run a Win32 PPM repository for perl 5.6x+5.8x. I take requests.
** The Third rule of perl club is a statement of fact: pod is sexy.

  • Comment on Re: Re: perlxs and c++ : dosish.h(111) : warning C4005: 'Stat' : macro redefinition (debug)
  • Download Code