The following script fails:
sub which
{
my ($name)=@_;
if (eval { require IPC::Cmd; 1; }) {
IPC::Cmd->import();
print “About to can run $name\n”;
my $ret = scalar IPC::Cmd::can_run($name);
print “Finished can run $name\n”;
return $ret;
}
}
my $j = which(“ranlib”);
print “$j”;
The following is the output on Windows 10 Ent 20H2: (Note is uses coloring that isn’t shown)
About to can run ranlib
It looks like you don't have either nmake.exe or dmake.exe on your PATH,
so you will not be able to execute the commands from a Makefile. You can
install dmake.exe with the Perl Package Manager by running:
ppm install dmake
Finished can run ranlib
Note: If you do have ranlib in your path just change it to something you don’t have.
Thanks,
SLDR