![](/img/trans.png)
[英]Is it possible to use the standard C++17 <filesystem> facilities with Zig in C++ compiler mode?
[英]C++17, Intel C++ compiler: what is the library needed to use filesystem header in windows 10 platform?
我只需要使用#include <filesystem>
进行一些文件系统操作,但是,我收到以下链接错误...我想我在 xlink 命令中缺少一个库。 下面是错误信息。
请让我知道您的宝贵意见。
test_accuracy.obj : error LNK2019: unresolved external symbol wmemcmp referenced in function "public: class std::filesystem::path & __cdecl std::filesystem::path::operator/=(class std::filesystem::path const &)" (??_0path@filesystem@std@@QEAAAEAV012@AEBV012@@Z)
Debug\test_accuracy.exe : fatal error LNK1120: 1 unresolved externals
编辑
您可以在下面看到编译和链接命令。 (谢谢)
icl -I"C:/Program Files (x86)/IntelSWTools/sw_dev_tools/compilers_and_libraries_2020.2.254/windows/compiler/include" -I/../boost_1_73_0 -Qstd=c++17 -Qdiag-error-limit:3 -O3 -MD -Fo:DEBUG/obj/test_accuracy.obj -c test_accuracy.cpp
xilink /OPT:REF /OPT:ICF /DEBUG:FASTLINK /TLBID:1 ole32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib -LIBPATH:Debug\lib -out:Debug/test_accuracy.exe DEBUG/obj/test_accuracy.obj
缺少的符号是 C 运行时的一部分。 尝试将vruntime.lib
添加到您的链接行,或使用 MSVC linker (link.exe) 链接。
我在这里提出了英特尔 C++ 社区的问题,结果证明这是一个可重现的问题,他们建议更新我的 VS 2019 社区版。 我更新到 16.8.5 并且它工作。 所以可能它可能是正确的解决方案。 (至少对我有用。)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.