【问题标题】:How can I configure the OpenDDS 3.13 with VS2017 community?如何使用 VS2017 社区配置 OpenDDS 3.13?
【发布时间】:2019-05-05 00:43:58
【问题描述】:

我使用的是 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 关于堆栈溢出的类似问题,但该答案与语言有关。这显然不是我的问题,我正在从正确类型的命令提示符运行配置脚本。这个问题不是重复的。 How to install OpenDDS 3.12 on windows system

【问题讨论】:

  • 你从configure --verbose得到什么输出?

标签: perl visual-studio-2017 opendds


【解决方案1】:

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

【讨论】:

    【解决方案2】:

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

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

    cl /?
    

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

    configure --compiler=19.16.27024.1 --java
    

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

    【讨论】:

    • 这不是设置$opts{compiler},而不是$opts{compiler_version}吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-09-27
    • 1970-01-01
    • 1970-01-01
    • 2017-10-02
    • 2018-10-09
    • 1970-01-01
    相关资源
    最近更新 更多