From 64ce4927e8ed65b09620c4080ec2942b6a52f31c Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Fri, 6 Jun 2025 00:14:35 +0800 Subject: Fix another wstring Boost filesystem linking error Basically string() functions call this convert(). The error was: llfilesystem.lib(lldiriterator.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) void __cdecl boost::filesystem::detail::path_traits::convert(unsigned short const *,unsigned short const *,class std::basic_string,c lass 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) [C:\Users\er ik\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) --- indra/llfilesystem/lldiriterator.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/llfilesystem/lldiriterator.cpp') diff --git a/indra/llfilesystem/lldiriterator.cpp b/indra/llfilesystem/lldiriterator.cpp index 61f768c512..cd99c79357 100644 --- a/indra/llfilesystem/lldiriterator.cpp +++ b/indra/llfilesystem/lldiriterator.cpp @@ -72,7 +72,11 @@ LLDirIterator::Impl::Impl(const std::string &dirname, const std::string &mask) if (!is_dir) { +#if LL_WINDOWS + LL_WARNS() << "Invalid path: \"" << utf16str_to_utf8str(dir_path.wstring()) << "\"" << LL_ENDL; +#else LL_WARNS() << "Invalid path: \"" << dir_path.string() << "\"" << LL_ENDL; +#endif return; } @@ -130,7 +134,11 @@ bool LLDirIterator::Impl::next(std::string &fname) while (mIter != end_itr && !found) { boost::smatch match; +#if LL_WINDOWS + std::string name = utf16str_to_utf8str(mIter->path().filename().wstring()); +#else std::string name = mIter->path().filename().string(); +#endif found = ll_regex_match(name, match, mFilterExp); if (found) { -- cgit v1.2.3