From 1212c9afd3c3590661981949c1aae01cae17c271 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 5 Jun 2025 22:27:28 +0800 Subject: Fix 2 wstring linking errors to Boost filesystem The errors were: llfilesystem.lib(lldiskcache.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl boost::filesystem::detail::path_traits::convert(char const *,char const *,class std::basic_string,cla ss std::allocator > &,class std::codecvt const *)" (__imp_?convert@path_traits@detail@filesystem@boost@@YAXPEBD0AEAV?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@PEBV?$codecvt@GDU_Mbstatet@@@6@@Z) refe renced in function "public: void __cdecl LLDiskCache::purge(void)" (?purge@LLDiskCache@@QEAAXXZ) [C:\Users\erik\Documents\Megapahit\viewer\build-mingw64_nt-10.0-19045-x86_64\newview\megapahit.vcxproj] Hint on symbols that are defined and could potentially match: "__declspec(dllimport) void __cdecl boost::filesystem::detail::path_traits::convert(char const *,char const *,class std::basic_string,class std::allocator > &,class std::codecvt const *)" (__imp_?convert@path_traits@detail@filesystem@boost@@YAXPEBD0AEAV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@PEBV?$codecvt@_WDU_Mbstatet@@@6@@Z) "__declspec(dllimport) void __cdecl boost::filesystem::detail::path_traits::convert(wchar_t const *,wchar_t const *,class std::basic_string,class std::allocator > &,class std::codecvt const *) " (__imp_?convert@path_traits@detail@filesystem@boost@@YAXPEB_W0AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBV?$codecvt@_WDU_Mbstatet@@@6@@Z) llfilesystem.lib(lldir.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl boost::filesystem::detail::path_traits::convert(unsigned short const *,unsigned short const *,class std::basic_string,class std ::allocator > &,class std::codecvt const *)" (__imp_?convert@path_traits@detail@filesystem@boost@@YAXPEBG0AEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBV?$codecvt@GDU_Mbstatet@@@6@@Z) referenced in functi on "public: class std::vector,class std::allocator >,class std::allocator,class std::allocator > > > __cdecl LLDir::getFilesInDir(class std: :basic_string,class std::allocator > const &)" (?getFilesInDir@LLDir@@QEAA?AV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@st d@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@@Z) [C:\Users\erik\Documents\Megapahit\viewer\build-mingw64_nt-10.0-19045-x86_64\newview\megapahit.vcxproj] --- indra/llfilesystem/lldir.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/llfilesystem/lldir.cpp') diff --git a/indra/llfilesystem/lldir.cpp b/indra/llfilesystem/lldir.cpp index e8e5d6538b..d12080aafa 100644 --- a/indra/llfilesystem/lldir.cpp +++ b/indra/llfilesystem/lldir.cpp @@ -121,7 +121,11 @@ std::vector LLDir::getFilesInDir(const std::string &dirname) { if (boost::filesystem::is_regular_file(dir_itr->status())) { +#if LL_WINDOWS + v.push_back(utf16str_to_utf8str(dir_itr->path().filename().wstring())); +#else v.push_back(dir_itr->path().filename().string()); +#endif } } } -- cgit v1.2.3