0

我正在尝试使用 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
4

1 回答 1

1

根据https://docs.microsoft.com/en-us/cpp/c-runtime-library/daylight-dstbias-timezone-and-tzname?view=vs-2017使用 Time.h 而不是time.h。

于 2019-01-06T17:10:30.993 回答