From df9970272800a71c180aa73fe2f71eb2f1b95fd5 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 23 Apr 2026 19:23:08 +0800 Subject: Fix another wstring Boost filesystem linking error The errors were: llfilesystem.lib(llfilesystem.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl boost::filesystem::detail::path_traits::convert(char const *,char const *,cl ass std::basic_string,class 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) referenced in function "public: __cd ecl boost::filesystem::path::path,class std::allocator >,void>(class std::basic_string,clas s std::allocator > const &)" (??$?0V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@X@path@filesystem@boost@@QEAA@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2 @@std@@@Z) [C:\Users\erik\Documents\Megapahit\viewer\build-mingw64_nt-10.0-26200-arm64-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?$a llocator@D@2@@std@@PEBV?$codecvt@_WDU_Mbstatet@@@6@@Z) --- indra/llfilesystem/llfilesystem.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra') diff --git a/indra/llfilesystem/llfilesystem.cpp b/indra/llfilesystem/llfilesystem.cpp index 728ff396ef..cd0ce45049 100644 --- a/indra/llfilesystem/llfilesystem.cpp +++ b/indra/llfilesystem/llfilesystem.cpp @@ -75,7 +75,11 @@ LLFileSystem::LLFileSystem(const LLUUID& file_id, const LLAssetType::EType file_ bool LLFileSystem::getExists(const LLUUID& file_id, const LLAssetType::EType file_type) { LL_PROFILE_ZONE_SCOPED; +#if LL_WINDOWS + const auto filename = ll_convert(LLDiskCache::metaDataToFilepath(file_id, file_type)); +#else const std::string filename = LLDiskCache::metaDataToFilepath(file_id, file_type); +#endif boost::system::error_code ec; if (boost::filesystem::exists(filename, ec) && boost::filesystem::is_regular_file(filename, ec)) @@ -117,7 +121,11 @@ bool LLFileSystem::renameFile(const LLUUID& old_file_id, const LLAssetType::ETyp // static S32 LLFileSystem::getFileSize(const LLUUID& file_id, const LLAssetType::EType file_type) { +#if LL_WINDOWS + const auto filename = ll_convert(LLDiskCache::metaDataToFilepath(file_id, file_type)); +#else const std::string filename = LLDiskCache::metaDataToFilepath(file_id, file_type); +#endif boost::system::error_code ec; if (boost::filesystem::exists(filename, ec) && boost::filesystem::is_regular_file(filename, ec)) -- cgit v1.3