LNK 2005 Errors during Packaging process

Hi guys,

I am working on a project with Unreal Engine 5.2.1 on Windows 11 Pro Machine. When I tried to package the project for Shipping, it showed following errors. The LNK 2005 error is normally caused by the functions that are defined in several files.

I changed the compiler to Visual Studio 2022 in Unreal in Edit → Project Settings → Platform (Windows) → Toolchain, but this errors still persist. Does anyone have an idea?

UATHelper: Packaging (Windows): all.lib(directory.obj) : error LNK2005: "void __cdecl boost::filesystem::detail::directory_iterator_increment(class boost::filesystem::directory_iterator &,class boost::system::error_code *)" (?directory_iterator_increment@detail@filesystem@boost@@YAXAEAVdirectory_iterator@23@PEAVerror_code@system@3@@Z) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(directory.obj) : error LNK2005: "private: class boost::filesystem::file_status __cdecl boost::filesystem::directory_entry::get_status(class boost::system::error_code *)const " (?get_status@directory_entry@filesystem@boost@@AEBA?AVfile_status@23@PEAVerror_code@system@3@@Z) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(path.obj) : error LNK2005: "private: void __cdecl boost::filesystem::path::append_v3(class boost::filesystem::path const &)" (?append_v3@path@filesystem@boost@@AEAAXAEBV123@@Z) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(path.obj) : error LNK2005: "public: static class std::codecvt<wchar_t,char,struct _Mbstatet> const & __cdecl boost::filesystem::path::codecvt(void)" (?codecvt@path@filesystem@boost@@SAAEBV?$codecvt@_WDU_Mbstatet@@@std@@XZ) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(path.obj) : error LNK2005: "private: int __cdecl boost::filesystem::path::compare_v3(class boost::filesystem::path const &)const " (?compare_v3@path@filesystem@boost@@AEBAHAEBV123@@Z) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(path.obj) : error LNK2005: "private: class boost::filesystem::path __cdecl boost::filesystem::path::extension_v3(void)const " (?extension_v3@path@filesystem@boost@@AEBA?AV123@XZ) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(path.obj) : error LNK2005: "private: class boost::filesystem::path __cdecl boost::filesystem::path::filename_v3(void)const " (?filename_v3@path@filesystem@boost@@AEBA?AV123@XZ) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(path.obj) : error LNK2005: "private: unsigned __int64 __cdecl boost::filesystem::path::find_parent_path_size(void)const " (?find_parent_path_size@path@filesystem@boost@@AEBA_KXZ) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(path.obj) : error LNK2005: "private: struct boost::filesystem::path_detail::substring __cdecl boost::filesystem::path::find_relative_path(void)const " (?find_relative_path@path@filesystem@boost@@AEBA?AUsubstring@path_detail@23@XZ) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(path.obj) : error LNK2005: "private: struct boost::filesystem::path_detail::substring __cdecl boost::filesystem::path::find_root_directory(void)const " (?find_root_directory@path@filesystem@boost@@AEBA?AUsubstring@path_detail@23@XZ) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(path.obj) : error LNK2005: "private: unsigned __int64 __cdecl boost::filesystem::path::find_root_name_size(void)const " (?find_root_name_size@path@filesystem@boost@@AEBA_KXZ) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(path.obj) : error LNK2005: "private: unsigned __int64 __cdecl boost::filesystem::path::find_root_path_size(void)const " (?find_root_path_size@path@filesystem@boost@@AEBA_KXZ) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(path.obj) : error LNK2005: "public: class boost::filesystem::path & __cdecl boost::filesystem::path::make_preferred(void)" (?make_preferred@path@filesystem@boost@@QEAAAEAV123@XZ) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(path.obj) : error LNK2005: "private: class boost::filesystem::path __cdecl boost::filesystem::path::stem_v3(void)const " (?stem_v3@path@filesystem@boost@@AEBA?AV123@XZ) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(operations.obj) : error LNK2005: "class boost::filesystem::path __cdecl boost::filesystem::detail::absolute(class boost::filesystem::path const &,class boost::filesystem::path const &,class boost::system::error_code *)" (?absolute@detail@filesystem@boost@@YA?AVpath@23@AEBV423@0PEAVerror_code@system@3@@Z) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(operations.obj) : error LNK2005: "class boost::filesystem::path __cdecl boost::filesystem::detail::canonical(class boost::filesystem::path const &,class boost::filesystem::path const &,class boost::system::error_code *)" (?canonical@detail@filesystem@boost@@YA?AVpath@23@AEBV423@0PEAVerror_code@system@3@@Z) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(operations.obj) : error LNK2005: "void __cdecl boost::filesystem::detail::copy(class boost::filesystem::path const &,class boost::filesystem::path const &,unsigned int,class boost::system::error_code *)" (?copy@detail@filesystem@boost@@YAXAEBVpath@23@0IPEAVerror_code@system@3@@Z) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(operations.obj) : error LNK2005: "bool __cdecl boost::filesystem::detail::create_directories(class boost::filesystem::path const &,class boost::system::error_code *)" (?create_directories@detail@filesystem@boost@@YA_NAEBVpath@23@PEAVerror_code@system@3@@Z) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(operations.obj) : error LNK2005: "bool __cdecl boost::filesystem::detail::create_directory(class boost::filesystem::path const &,class boost::filesystem::path const *,class boost::system::error_code *)" (?create_directory@detail@filesystem@boost@@YA_NAEBVpath@23@PEBV423@PEAVerror_code@system@3@@Z) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(operations.obj) : error LNK2005: "class boost::filesystem::path __cdecl boost::filesystem::detail::current_path(class boost::system::error_code *)" (?current_path@detail@filesystem@boost@@YA?AVpath@23@PEAVerror_code@system@3@@Z) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(operations.obj) : error LNK2005: "bool __cdecl boost::filesystem::detail::equivalent(class boost::filesystem::path const &,class boost::filesystem::path const &,class boost::system::error_code *)" (?equivalent@detail@filesystem@boost@@YA_NAEBVpath@23@0PEAVerror_code@system@3@@Z) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(operations.obj) : error LNK2005: "unsigned __int64 __cdecl boost::filesystem::detail::file_size(class boost::filesystem::path const &,class boost::system::error_code *)" (?file_size@detail@filesystem@boost@@YA_KAEBVpath@23@PEAVerror_code@system@3@@Z) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(operations.obj) : error LNK2005: "bool __cdecl boost::filesystem::detail::is_empty(class boost::filesystem::path const &,class boost::system::error_code *)" (?is_empty@detail@filesystem@boost@@YA_NAEBVpath@23@PEAVerror_code@system@3@@Z) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(operations.obj) : error LNK2005: "__int64 __cdecl boost::filesystem::detail::last_write_time(class boost::filesystem::path const &,class boost::system::error_code *)" (?last_write_time@detail@filesystem@boost@@YA_JAEBVpath@23@PEAVerror_code@system@3@@Z) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(operations.obj) : error LNK2005: "class boost::filesystem::path __cdecl boost::filesystem::detail::relative(class boost::filesystem::path const &,class boost::filesystem::path const &,class boost::system::error_code *)" (?relative@detail@filesystem@boost@@YA?AVpath@23@AEBV423@0PEAVerror_code@system@3@@Z) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(operations.obj) : error LNK2005: "unsigned __int64 __cdecl boost::filesystem::detail::remove_all(class boost::filesystem::path const &,class boost::system::error_code *)" (?remove_all@detail@filesystem@boost@@YA_KAEBVpath@23@PEAVerror_code@system@3@@Z) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(operations.obj) : error LNK2005: "void __cdecl boost::filesystem::detail::rename(class boost::filesystem::path const &,class boost::filesystem::path const &,class boost::system::error_code *)" (?rename@detail@filesystem@boost@@YAXAEBVpath@23@0PEAVerror_code@system@3@@Z) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(operations.obj) : error LNK2005: "class boost::filesystem::file_status __cdecl boost::filesystem::detail::status(class boost::filesystem::path const &,class boost::system::error_code *)" (?status@detail@filesystem@boost@@YA?AVfile_status@23@AEBVpath@23@PEAVerror_code@system@3@@Z) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(operations.obj) : error LNK2005: "class boost::filesystem::path __cdecl boost::filesystem::detail::temp_directory_path(class boost::system::error_code *)" (?temp_directory_path@detail@filesystem@boost@@YA?AVpath@23@PEAVerror_code@system@3@@Z) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)
UATHelper: Packaging (Windows): all.lib(operations.obj) : error LNK2005: "class boost::filesystem::path __cdecl boost::filesystem::detail::weakly_canonical(class boost::filesystem::path const &,class boost::filesystem::path const &,class boost::system::error_code *)" (?weakly_canonical@detail@filesystem@boost@@YA?AVpath@23@AEBV423@0PEAVerror_code@system@3@@Z) already defined in boost_filesystem-mt-x64.lib(boost_filesystem-mt-x64.dll)