Perl脚本缺少编译器的路径

编程入门 行业动态 更新时间:2024-10-23 09:40:22
本文介绍了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"; } }

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

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脚本缺少编译器的路径

本文发布于:2023-11-10 22:34:03,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1576650.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:编译器   脚本   路径   Perl

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!