d.ra.ke has asked for the wisdom of the Perl Monks concerning the following question:

I have installed Activestate Perl 5.20 on a Windows 2012 Server. The default settings for make/Compiler are 'dmake' and 'mingw'. So i installed Visual Studio Express and the MS SDK. I put the dirs in the PATH, executed 'vcvars*', but when trying to install a certain module, i always get the error that the MS Compiler is needed but only 'mingw' is available. I need to install Win32::GUI::Grid and it only Compiles with MSVC... I can install Win32::GUI without any error show, but in fact win32::GUI::Grid and at least win32::GUI::axWindow are mnot installed. I also cannot switch to linux or another Perl Distribution, since I have to 'compile' with PerlApp. An suggestions where or how to change the settings?
  • Comment on Activestate Perl 5.20, Change make/compiler

Replies are listed 'Best First'.
Re: Change make/compiler
by Corion (Patriarch) on Oct 06, 2015 at 13:41 UTC

    I think that ActiveState Perl is compiled with MSVC 6 and likely incompatible with newer versions of MSVC.

    If you really, really want to change the settings, you will need to run vcvars32.bat to set up your environment before trying to configure or install the module. You will then need to edit lib/Config_heavy.pl to reflect the new names and tools you want to use. Alternatively you can maybe also set things up using sitecustomize.pl.

      I think that ActiveState Perl is compiled with MSVC 6 ...

      Not any more - 5.20.0 and later are built using dmake and MinGW.

      If I were the OP I would probably just build perl from source, using the MSVC toolchain that the OP has already acquired - and use that to build the desired module.
      If it's the same version as the ActivePerl already installed, then the installation of Win32::GUI::Grid can then be copied across to the ActivePerl installation.
      Update: I've assumed that the MSVC-built perl is going to be built so that it's binary-compatible with ActivePerl.

      It's not hard to change compiler and make flavours, but there's also flags and other settings to be fiddled with - and I don't think anyone has sorted out all those changes yet (though I'd be delighted to learn that I'm wrong about that.)

      This would be an obvious task for ExtUtils::FakeConfig to address, but I think it currently concerns itself only with the vice-versa case of using MinGW/dmake with MSVC-built perls.

      Cheers,
      Rob
        hehe  set ACTIVEPERL_CONFIG_DISABLE=1 && D:\perl\zips\ActivePerl-5.16.3\bin\perl.exe  -V:cc -V:ccname -V:ccflags -V:cccdlflags -V:libpth -V:libs -V:_a -V:_o -V:ar -V:cpp -V:cppminus -V:cpprun -V:cppstdin -V:d_attribut -V:d_casti32 -V:i64type -V:ld -V:lddlflags -V:ldflags -V:lib_ext -V:libc -V:libperl -V:longdblsize -V:lseektype -V:make -V:nm -V:obj_ext -V:optimize -V:perlpath -V:perllibs -V:quadtype -V:u64type -V:uquadtype         > ExtUtils-FakeConfig-0.12/spec/ap_cl_5160.txt

        Then you do something like

        s{(".+?\Q\lib\CORE"\E){(PERL)\lib\CORE}g; s{perlpath='.+?\Q\bin\perl.exe';\E}{perlpath='(PERL)\bin\perl.exe';}g;

        So then with ActivePerl-5.16.3 you have

        And then something something ExtUtils-FakeConfig-0.12/Makefile.PL :)

Re: Activestate Perl 5.20, Change make/compiler
by Anonymous Monk on Oct 07, 2015 at 00:32 UTC

    The default settings for make/Compiler are 'dmake' and 'mingw'. So i installed Visual Studio Express and the MS SDK.

    Why?

      Well, i don't know. It's a fresh install and as syphilis pointed out earlier it seems to be the default for 5.20