【发布时间】:2018-05-17 22:10:19
【问题描述】:
我正在尝试为 OpenDDS 配置环境,但我无法运行配置脚本。真的很感激,如果你们有任何见解。 =D
基本上,在我从here 下载 OpenDDS-3.12.zip 之后。我已解压到一个文件夹并尝试在 VS 命令提示符(VS2017)中使用此命令运行配置文件
configure --compiler=gcc
接下来,下载“ACE+TAO-2.2a_with_latest_patches_NO_makefiles”并将压缩文件解压到根文件夹。
然后它显示这条消息。
ACE_ROOT/ace/config.h exists, skipping configuration of ACE+TAO
Use of uninitialized value $mpctype in string eq at configure line 1103.
Use of uninitialized value $mpctype in concatenation (.) or string at configure line 1257.
Use of uninitialized value $mpctype in string eq at configure line 1266.
Running MPC to generate project files.
MPC_ROOT was set to C:\src\OpenDDS-DDS-3.12.2\ACE_wrappers\MPC.
Using .../OpenDDS-DDS-
3.12.2/ACE_wrappers/bin/MakeProjectCreator/config/MPC.cfg
ERROR: Invalid type: C:\src\OpenDDS-DDS-3.12.2\DDS_TAOv2_all.mwc
mwc.pl v4.1.28
...
/*lots of explanation of each file here*
*then followed by*/
...
ERROR: Error from MPC, stopped at configure line 1270.
我同时安装了 Visual Studio 2017 和 Perl 5.22,我不确定这是编译器问题还是其他问题。以下是打印上述错误的配置脚本。
@@ line 1268 -- 1270 @@
if (!$opts{'dry-run'}) {
if (system("perl \"$ENV{'ACE_ROOT'}/bin/mwc.pl\" $mwcargs") != 0) {
die "ERROR: Error from MPC, stopped";
}
}
【问题讨论】:
-
找出
$mpctype的定义位置,可能是缺少环境变量或命令开关。 -
另外,一般来说,第一个警告/错误对于查看代码最有用,而不是最后一个,所以这里我将从第 1103 行而不是第 1266 行开始查看。
-
不要使用
--compiler=gcc,你使用的不是gcc而是Visual Studio -
也许我应该从问题的根源开始。当我尝试仅使用
--compiler时,它会向我显示ERROR: 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 378.我已经在系统中检查了我的 PATH,perl 是否在其中,或者我错过了什么? -
您应该在 Visual Studio 命令提示符下执行命令,您这样做了吗?