Perl脚本缺少编译器的路径-什么编译器? [英] perl script lacking path for compiler - what compiler?

查看:455
本文介绍了Perl脚本缺少编译器的路径-什么编译器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在遵循openDDS 安装指南时,我尝试在命令提示符下运行configure但收到以下输出:

When following the openDDS install guide I attempt to run configure from within the command prompt but receive this output:

C:\ Users \ Supervisor \ Desktop \ opendds> C:\ Users \ Supervisor \ Desktop \ opendds \ configure.cmd

C:\Users\Supervisor\Desktop\opendds>C:\Users\Supervisor\Desktop\opendds\configure.cmd

Can't find a compiler, set PATH or run this script with the --compiler option.
For Microsoft Visual C++, run this script from the Visual Studio Command Prompt.
Stopped at configure line 336.

此错误与perl脚本中的这段代码有关(如行号所示):

This error relates to this section of code within the perl script (as seen by the line number):

if ($opts{'compiler'}) {
    my $standard = 0;
    for my $stdcomp (@{$platforminfo{$opts{'host'}}->{'compilers'}}) {
        $standard = 1 if $opts{'compiler'} eq $stdcomp;
    }
    $opts{'nonstdcompiler'} = 1 unless $standard;
}
else {
    print "Auto-detecting compiler\n" if $opts{'verbose'};
    for my $stdcomp (@{$platforminfo{$opts{'host'}}->{'compilers'}}) {
        my $path = which($stdcomp);
        if ($path) {
            print "Found $stdcomp at: $path\n" if $opts{'verbose'};
            $opts{'compiler'} = $stdcomp;
            last;
        }
    }
    if (!defined $opts{'compiler'}) {
        die "Can't find a compiler, set PATH or run this script with the ".
        "--compiler option.\n" . ($slash eq '\\' ? "  For Microsoft Visual C++, ".
        "run this script from the Visual Studio ".
        "Command Prompt.\n" : '') . "Stopped";
    }
}

它想要什么编译器?我有gccmake工作-它们在系统路径上.

What compiler does it want? I have gcc and make working - they are on the system path.

推荐答案

我认为Windows不会将gcc列为自然安装的编译器.

I suppose that windows does not list gcc as a naturally installed compiler.

在linux上,它马上就可以工作.

On linux it would have worked right away.

因此,如果gcc在路径中,则只需添加--compiler=gcc即可.

So just add --compiler=gcc if gcc is in the path, it should work.

这篇关于Perl脚本缺少编译器的路径-什么编译器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆