Replace the Module::Build Makefile.PL with an EU::MM one:
Run Makefile.PL with CC var to enable C++ mode:#!/usr/bin/perl use strict; use ExtUtils::MakeMaker qw(WriteMakefile); my @INC = (' -Isrc -Iinclude'); WriteMakefile( NAME => 'Encode::Detect::Detector', VERSION_FROM => 'Detector.pm', PREREQ_PM => {}, ABSTRACT_FROM => 'Detector.pm', AUTHOR => '', INC => join(' ', @INC), C => [ glob 'src/*.cpp Detector.c' ], H => [ glob 'src/*.h' ], OBJECT => q/$(O_FILES)/, );
This will fail because it's looking for *.obj files in the src directory but they were built in the main directory.$ perl Makefile.PL CC="cl -TP" $ nmake
This will compile everything, but not copy Encode/Detect.pm to the correct place.$ copy *.obj src $ nmake
Done! There is almost certainly a way within Makefile.PL to work around the last 2 issues, but I didn't want to spend any more time on it.$ copy Detect.pm blib\lib\Encode $ nmake test
In reply to Re: Cannot compile Encode::Detect on Windows
by agrundma
in thread Cannot compile Encode::Detect on Windows
by gvr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |