0

我正在使用 Visual Studio 2017。以下是 Visual Studio Developer 命令提示符的输出,指示 C++ 版本。

C:\ProgramsNotInstalled\OpenDDS-3.13>cl /?
Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27024.1 for x86

之后,我在运行 configure --java 命令时看到以下输出。

**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.9.3
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************

C:\ProgramsNotInstalled\OpenDDS-3.13>configure
ERROR: Could not detect Visual C++ version, try running this script from the Visual Studio Command Prompt.
Stopped at configure line 421.

C:\ProgramsNotInstalled\OpenDDS-3.13>configure --java
ERROR: Could not detect Visual C++ version, try running this script from the Visual Studio Command Prompt.
Stopped at configure line 421.

C:\ProgramsNotInstalled\OpenDDS-3.13>

我看到 DDS 3.12 关于堆栈溢出的类似问题,但该答案与语言有关。这显然不是我的问题,我正在从正确类型的命令提示符运行配置脚本。这个问题不是重复的。 如何在windows系统上安装OpenDDS 3.12

4

2 回答 2

0

这是 OpenDDS 3.13 配置脚本中的一个小问题,它是由发布时未知的编译器版本更改引起的。当您拉 github master(请参阅https://github.com/objectcomputing/OpenDDS)时,这应该会再次起作用,或者等到 OpenDDS 3.14。

于 2018-12-04T14:41:07.357 回答
0

显然,配置脚本不能总是自动检测编译器版本。我不擅长阅读 perl 脚本,因为我不太了解 perl,但我找到了一个帮助脚本的选项。

首先通过运行以下行来确定 C++ 编译器的确切版本:

cl /?

现在使用它的输出,将 --compiler 选项添加到命令行。

configure --compiler=19.16.27024.1 --java

INSTALL 文件和自述文件中的说明在这一点上并不清楚。我运行了 configure --help 来查看命令行选项,这就是我了解到脚本将尝试自动检测编译器的方式。我的猜测是该脚本正在寻找特定的 C++ 编译器版本,或者它使用的正则表达式运行不佳。

于 2018-12-03T17:36:29.963 回答