gpt4 book ai didi

c++ - 检查 C++ 编译器的存在

转载 作者:行者123 更新时间:2023-11-28 03:18:25 28 4
gpt4 key购买 nike

AC_PROG_CXX 的 GNU 文档指出:

Otherwise, if the macro is invoked without an argument, then search for a C++ compiler under the likely names (first g++ and c++ then other names). If none of those checks succeed, then as a last resort set CXX to g++.

这意味着无论是否找到工作的 C++ 编译器,CXX 变量都将被设置为某个值。因此,无法使用 CXX 了解 C++ 编译器是否可用。

如何在 ./configure 时检查 C++ 编译器是否可用?

最佳答案

您可以添加一个额外的 AC_CHECK_PROG检查,以确保找到编译器。

关于c++ - 检查 C++ 编译器的存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16168777/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com