Visual Studio 14.9.19
Intel Parallel Studio XE 2020
Latest Windows 10
The following piece of code (VS project attached) fails to link with an error
1>ipo_1894819obj3.obj : : error LNK2019: unresolved external symbol wmemcmp referenced in function main
when built it in C++17 mode.
#include "stdafx.h" #include <string> #include <wchar.h> int main() { std::wstring a = L"Hallo"; std::wstring b = L"Dulla"; printf("%d\n", int(a == b)); // comment out this line and it will link fine printf("%d\n", wmemcmp(a.data(), b.data(), 5)); return 0; }
When I comment out the marked line, it links fine.
When I switch C++ standard to C++14 it builds fine, too.
As the line with the explicit call to "wmemcmp" does not cause any problems I have the impression that the wmemcmp used for the wstring comparison uses an erroneous function signature in C++17-mode only.
Regards, Frank