Windows Vista compile of Win32::API with MinGW & MSVC++

cosimo on 2007-12-28T22:49:23

On my main PC used to develop CPAN work on Windows I had installed MSVC6, cygwin and strawberry/vanilla Perl.

At the start of November I had to switch to a new laptop with (arghh...) Vista. Then I installed MSVC++ 2005 and 2008, the free editions. And I installed also the Windows Server 2003 Platform SDK, which I thought was the SDK to go with.

Last week Vista ended up filling all its allocated disk space, and I decided to dump all MSVC & SDK installations plus other stuff to DVDs.

Then I reinstalled the compilers and the Microsoft Windows Vista SDK but since then I never got to compile anything again. The error messages are like the following:


gcc -c -I"\Program files\Microsoft SDKs\Windows\V6.0\Include" -I"\Program files\
Microsoft SDKs\Windows\V6.0\VC\include"         -s -O2 -DWIN32 -DHAVE_DES_FCRYPT
 -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_
READFIX -s -O2    -DVERSION=\"0.47\"    -DXS_VERSION=\"0.47\"  "-IC:\strawberry\
perl\lib\CORE"   Callback.c
In file included from /Program files/Microsoft SDKs/Windows/V6.0/Include/winnt.h :105,
from /Program files/Microsoft SDKs/Windows/V6.0/Include/windef. h:177,
from /Program files/Microsoft SDKs/Windows/V6.0/Include/windows .h:155,
from Callback.xs:17: /Program files/Microsoft SDKs/Windows/V6.0/Include/basetsd.h:81: error: syntax e rror before "INT64"
/Program files/Microsoft SDKs/Windows/V6.0/Include/basetsd.h:81: warning: data d efinition has no type or storage class
/Program files/Microsoft SDKs/Windows/V6.0/Include/basetsd.h:85: error: syntax e rror before "UINT64"
/Program files/Microsoft SDKs/Windows/V6.0/Include/basetsd.h:85: warning: data d efinition has no type or storage class
/Program files/Microsoft SDKs/Windows/V6.0/Include/basetsd.h: In function `PtrTo Ptr64':
/Program files/Microsoft SDKs/Windows/V6.0/Include/basetsd.h:363: error: syntax error before "__int64"
...

They seem to be related to this basetsd.h header file and the INT64 typedefs.

Now I don't know if the Vista SDK is screwed up, and I'd better revert to the Win 2003 Server SDK, or I did something else which screwed up everything...

What the _______ is going on here? Anyone has experiences with Perl gcc/MSVC compiles on Vista?

Anyway, I remember having correctly compiled perl-5.10, parrot and Win32::API with MSVC2005 and 2008 with W2003 Platform SDK. I will try to revert back to that and retry everything from scratch.

I promise I will write a step-by-step walk-through if everything works in the end.
BTW, I'm also working on patching ExtUtils::MakeMaker to correctly detect the PASTHRU_INC Makefile variable (there's already a ticket on RT about that).