link error LNK2019 introduced by adding std::ofstream on windows VS2017
plf_algo_test_lib is the lib to be tested, which is linked to plf_algo_test(test project). The problem is when I added std::ofstream file("debugData.json") code in plf_algo_test_lib, I got the following link error from plf_algo_test.
error Description:
LNK2019 unresolved external symbol "public: static class std::locale::_Locimp * __cdecl std::locale::_Getgloballocale(void)" (?_Getgloballocale@locale@std@@SAPAV_Locimp@12@XZ) referenced in function "public: class std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned int)const " (?_Getfacet@locale@std@@QBEPBVfacet@12@I@Z)
project: plf_algo_test
file: D:\GitRepos\PLF\plf\build\tests\unit\generic\plf_algo\plf_algo_test_lib.lib(pose_optimize.obj)
Both plf_algo_test_lib and plf_algo_test are compiled with /MDd option.
Here is the output log of plf_algo_test /VERBOSE
Any ideas on how to get this error resolved? Thanks in advance.