当关注openDDS install guide时,我尝试在命令提示符下运行configure
但是收到此输出:
C:\用户\主管\桌面\ opendds> C:\用户\主管\桌面\ 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脚本中的此部分代码有关(如行号所示):
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
工作 - 他们在系统路径上。
答案 0 :(得分:3)
我认为windows不会将gcc
列为自然安装的编译器。
在Linux上它会立即起作用。
如果--compiler=gcc
位于路径中,只需添加gcc
即可。