[LLVM-9 clang-9 OSX]:std :: filesystem :: path无法识别

问题描述 投票:0回答:1

使用brew upgrade llvm在OSX Mojave上升级到LLVM-9版本后,您好

我遇到以下错误:

In file included from /Users/roman/CLionProjects/Milerius/antara-gaming-sfml-template/cmake-build-debug/_deps/antara-gaming-sdk-src/modules/core/antara/gaming/core/real.path.cpp:17:
/Users/roman/CLionProjects/Milerius/antara-gaming-sfml-template/cmake-build-debug/_deps/antara-gaming-sdk-src/modules/core/antara/gaming/core/real.path.hpp:23:22: fatal error: 'path' is unavailable: introduced in macOS 10.15
    std::filesystem::path binary_real_path() noexcept;
                     ^
/usr/local/opt/llvm/bin/../include/c++/v1/filesystem:738:24: note: 'path' has been explicitly marked unavailable here

我的代码:

#include <filesystem>

namespace antara::gaming::core
{
    std::filesystem::path binary_real_path() noexcept;
    std::filesystem::path assets_real_path() noexcept;
}

这正常吗?

c++ c++17 clang++ libc++ std-filesystem
1个回答
0
投票

一种解决方案是使用:-mmacosx-version-min=10.15编译器标志

© www.soinside.com 2019 - 2024. All rights reserved.