gpt4 book ai didi

c++ - 我将什么标志传递给 clang-cl 以获取 time.h、_CSTD、正确的 wint_t 和 mbstate_t?

转载 作者:行者123 更新时间:2023-11-28 04:26:54 29 4
gpt4 key购买 nike

我正在尝试使用 clang-cl 编译大型线性代数包 Trilinos。我用

配置它
-DCMAKE_C_COMPILER:FILEPATH='C:/Program Files/LLVM/bin/clang-cl.exe' \
-DCMAKE_CXX_COMPILER:FILEPATH='C:/Program Files/LLVM/bin/clang-cl.exe' \
-DCMAKE_C_FLAGS:STRING='/DWIN32 /D_WINDOWS /W3 -fms-compatibility-version=19' \
-DCMAKE_CXX_FLAGS:STRING='/DWIN32 /D_WINDOWS /W3 /GR /EHsc /std:c++14 -fms-compatibility-version=19' \

我收到如下所示的错误。我是否需要向 clang-cl 传递一些标志以在包含路径中包含 time.h?为了让其他类型正确?

谢谢.....约翰·卡里

D:\winsame\cary\vorpalall-llvm\builds\trilinos-12.12.1\cmake\tribits\win_interface\include\gettimeofday.c(1,10):  fatal error: ' time.h ' file not found^M
#include < time.h >^

C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared\stralign.h(483,16): error: use of undeclared identifier '_wcsicmp'; did you mean 'ua_wcsicmp'?^M
return _wcsicmp( (LPCWSTR)String1, (LPCWSTR)String2 );^M
^^M
C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared\stralign.h(477,1): note: 'ua_wcsicmp' declared here^M
ua_wcsicmp(

C:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt\corecrt.h(483,39): error: typedef redefinition with different types ('unsigned short' vs 'int')^M
typedef unsigned short wint_t;^

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.11.25503\include\cstdlib(23,16): error: no member named 'fabsl' in the global namespace^M
return (_CSTD fabsl(_Xx));^M

最佳答案

关于c++ - 我将什么标志传递给 clang-cl 以获取 time.h、_CSTD、正确的 wint_t 和 mbstate_t?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54062916/

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