您好,在 OSX Mojave 上升级到版本 LLVM-9 后,使用brew upgrade llvm
我收到以下错误:
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
my code:
#include <filesystem>
namespace antara::gaming::core
{
std::filesystem::path binary_real_path() noexcept;
std::filesystem::path assets_real_path() noexcept;
}
这是正常的吗?
解决方案之一是使用:-mmacosx-version-min=10.15
编译器标志
在 CMake 中:
add_library(antara_cross_filesystem INTERFACE)
add_library(antara::cross_filesystem ALIAS antara_cross_filesystem)
target_link_libraries(antara_cross_filesystem INTERFACE
$<$<AND:$<PLATFORM_ID:Linux>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:stdc++fs>
$<$<AND:$<PLATFORM_ID:Darwin>,$<VERSION_LESS:$<CXX_COMPILER_VERSION>,9.0>>:c++fs>)
target_compile_options(antara_cross_filesystem INTERFACE
$<$<AND:$<PLATFORM_ID:Darwin>,$<VERSION_GREATER:$<CXX_COMPILER_VERSION>,8.0>>:-mmacosx-version-min=10.15>)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)