• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.5 8.6 Compiling problem [GREED TFS 1.5]

Dran Ryszard

Member
Joined
Apr 25, 2023
Messages
72
Reaction score
15
Location
Poland
Hi, i build new PC and i installed again vs2022, vcpkg blabla, but when i tried compile tfs 1.5 (greed version)
I got that error, fmt package is installed.
If i good remember, when im used this tfs pack on my old pc, it work perfect without any errors, maybe someone packed got update?

Code:
Build started...
1>------ Build started: Project: theforgottenserver, Configuration: Release x64 ------
1>iomapserialize.cpp
1>C:\vcpkg\installed\x64-windows\include\fmt\core.h(1576,63): error C2079: '_' uses undefined struct 'fmt::v10::detail::type_is_unformattable_for<T,char>'
1>        with
1>        [
1>            T=AccessList_t
1>        ]
1>C:\vcpkg\installed\x64-windows\include\fmt\core.h(1808,23): message : see reference to function template instantiation 'fmt::v10::detail::value<Context> fmt::v10::detail::make_arg<true,Context,AccessList_t,0>(T &)' being compiled
1>        with
1>        [
1>            Context=fmt::v10::format_context,
1>            T=AccessList_t
1>        ]
1>C:\vcpkg\installed\x64-windows\include\fmt\core.h(1826,3): message : see reference to function template instantiation 'fmt::v10::format_arg_store<fmt::v10::format_context,unsigned int,AccessList_t,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::format_arg_store<uint32_t,AccessList_t,std::string>(uint32_t &,AccessList_t &,std::string &)' being compiled
1>C:\vcpkg\installed\x64-windows\include\fmt\core.h(2788,28): message : see reference to function template instantiation 'fmt::v10::format_arg_store<fmt::v10::format_context,unsigned int,AccessList_t,std::basic_string<char,std::char_traits<char>,std::allocator<char>>> fmt::v10::make_format_args<fmt::v10::format_context,uint32_t,AccessList_t,std::string>(uint32_t &,AccessList_t &,std::string &)' being compiled
1>C:\Users\knowa\Desktop\Greed-TFS-1.5-Downgrades-8.60\src\iomapserialize.cpp(331,26): message : see reference to function template instantiation 'std::string fmt::v10::format<uint32_t,AccessList_t,std::string>(fmt::v10::basic_format_string<char,unsigned int,AccessList_t,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,uint32_t &&,AccessList_t &&,std::string &&)' being compiled
1>C:\vcpkg\installed\x64-windows\include\fmt\core.h(1580,7): error C2338: static_assert failed: 'Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt'
1>Done building project "theforgottenserver.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build started at 17:32 and took 02,618 seconds ==========
 
Hi, i build new PC and i installed again vs2022, vcpkg blabla, but when i tried compile tfs 1.5 (greed version)
I got that error, fmt package is installed.
If i good remember, when im used this tfs pack on my old pc, it work perfect without any errors, maybe someone packed got update?

Code:
Build started...
1>------ Build started: Project: theforgottenserver, Configuration: Release x64 ------
1>iomapserialize.cpp
1>C:\vcpkg\installed\x64-windows\include\fmt\core.h(1576,63): error C2079: '_' uses undefined struct 'fmt::v10::detail::type_is_unformattable_for<T,char>'
1>        with
1>        [
1>            T=AccessList_t
1>        ]
1>C:\vcpkg\installed\x64-windows\include\fmt\core.h(1808,23): message : see reference to function template instantiation 'fmt::v10::detail::value<Context> fmt::v10::detail::make_arg<true,Context,AccessList_t,0>(T &)' being compiled
1>        with
1>        [
1>            Context=fmt::v10::format_context,
1>            T=AccessList_t
1>        ]
1>C:\vcpkg\installed\x64-windows\include\fmt\core.h(1826,3): message : see reference to function template instantiation 'fmt::v10::format_arg_store<fmt::v10::format_context,unsigned int,AccessList_t,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>::format_arg_store<uint32_t,AccessList_t,std::string>(uint32_t &,AccessList_t &,std::string &)' being compiled
1>C:\vcpkg\installed\x64-windows\include\fmt\core.h(2788,28): message : see reference to function template instantiation 'fmt::v10::format_arg_store<fmt::v10::format_context,unsigned int,AccessList_t,std::basic_string<char,std::char_traits<char>,std::allocator<char>>> fmt::v10::make_format_args<fmt::v10::format_context,uint32_t,AccessList_t,std::string>(uint32_t &,AccessList_t &,std::string &)' being compiled
1>C:\Users\knowa\Desktop\Greed-TFS-1.5-Downgrades-8.60\src\iomapserialize.cpp(331,26): message : see reference to function template instantiation 'std::string fmt::v10::format<uint32_t,AccessList_t,std::string>(fmt::v10::basic_format_string<char,unsigned int,AccessList_t,std::basic_string<char,std::char_traits<char>,std::allocator<char>>>,uint32_t &&,AccessList_t &&,std::string &&)' being compiled
1>C:\vcpkg\installed\x64-windows\include\fmt\core.h(1580,7): error C2338: static_assert failed: 'Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt'
1>Done building project "theforgottenserver.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build started at 17:32 and took 02,618 seconds ==========
Use this commit Fix fmt Warning C4275 | Format enum by MillhioreBT · Pull Request #4466 · otland/forgottenserver (https://github.com/otland/forgottenserver/pull/4466/files#diff-324e0607787321f61354325cf71b34fd25d190ddc82c86e19293ece4f7916abc)
 

Now i got:
Code:
1>C:\Users\knowa\Desktop\DepresjaOT\src\iomapserialize.cpp(332,58): error C3861: 'format_as': identifier not found
1>C:\Users\knowa\Desktop\DepresjaOT\src\iomapserialize.cpp(340,70): error C3861: 'format_as': identifier not found

And still failed
 
Now i got:
Code:
1>C:\Users\knowa\Desktop\DepresjaOT\src\iomapserialize.cpp(332,58): error C3861: 'format_as': identifier not found
1>C:\Users\knowa\Desktop\DepresjaOT\src\iomapserialize.cpp(340,70): error C3861: 'format_as': identifier not found

And still failed
The identifier format_as is declared in your tools header file, looks like you didn't include it into tools.h file.
try to add this part into your tools.h
C++:
template < typename E >
  auto format_as(E e) {
    return fmt::underlying(e);
  }
 
@Obito ye i don't saw it, but now i got that errors:
Its so fucking crazy, couse i dont remember to do it on my old pc.. All work with clear files.

Code:
Build started...
1>------ Build started: Project: theforgottenserver, Configuration: Release x64 ------
1>actions.cpp
1>ban.cpp
1>baseevents.cpp
1>bed.cpp
1>chat.cpp
1>combat.cpp
1>condition.cpp
1>configmanager.cpp
1>connection.cpp
1>container.cpp
1>creature.cpp
1>creatureevent.cpp
1>depotchest.cpp
1>depotlocker.cpp
1>events.cpp
1>game.cpp
1>globalevent.cpp
1>groups.cpp
1>guild.cpp
1>house.cpp
1>housetile.cpp
1>iologindata.cpp
1>iomap.cpp
1>iomapserialize.cpp
1>item.cpp
1>items.cpp
1>luascript.cpp
1>mailbox.cpp
1>map.cpp
1>monster.cpp
1>monsters.cpp
1>movement.cpp
1>networkmessage.cpp
1>npc.cpp
1>otserv.cpp
1>outfit.cpp
1>outputmessage.cpp
1>party.cpp
1>player.cpp
1>protocol.cpp
1>protocolgame.cpp
1>protocollogin.cpp
1>protocolold.cpp
1>quests.cpp
1>raids.cpp
1>scriptmanager.cpp
1>server.cpp
1>signals.cpp
1>spawn.cpp
1>spells.cpp
1>protocolstatus.cpp
1>talkaction.cpp
1>tasks.cpp
1>teleport.cpp
1>thing.cpp
1>tile.cpp
1>tools.cpp
1>trashholder.cpp
1>vocation.cpp
1>weapons.cpp
1>house.obj : error LNK2001: unresolved external symbol "public: static unsigned int __cdecl IOGuild::getGuildIdByName(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?getGuildIdByName@IOGuild@@SAIAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>house.obj : error LNK2001: unresolved external symbol "public: static class Guild * __cdecl IOGuild::loadGuild(unsigned int)" (?loadGuild@IOGuild@@SAPEAVGuild@@I@Z)
1>iologindata.obj : error LNK2001: unresolved external symbol "public: static void __cdecl IOGuild::getWarList(unsigned int,class std::vector<unsigned int,class std::allocator<unsigned int> > &)" (?getWarList@IOGuild@@SAXIAEAV?$vector@IV?$allocator@I@std@@@std@@@Z)
1>C:\Users\knowa\Desktop\DepresjaOT\vc17\x64\Release\theforgottenserver-x64.exe : fatal error LNK1120: 3 unresolved externals
1>Done building project "theforgottenserver.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build started at 18:37 and took 21,507 seconds ==========
 
The identifier format_as is declared in your tools header file, looks like you didn't include it into tools.h file.
try to add this part into your tools.h
C++:
template < typename E >
  auto format_as(E e) {
    return fmt::underlying(e);
  }
template < typename E >
auto format_as(E e) {
return fmt::underlying(e);
}


at tools.h before "#endif" (last-line) solved for me today 25/8/2024 in nekiro downgrade 7.72 compiled at windows 10 with Visual Studio Community 2022.

and putting "/utf-8" at project properties>c/c++>command line>additional options>apply



EDIT: i was trying to do this change TFS 1.5 Downgrade Nekiro / Outfits.xml (https://otland.net/threads/tfs-1-5-downgrade-nekiro-outfits-xml.282376/) and compile again so i can use the: "g_game.enableFeature(GameNewOutfitProtocol)" on otclient
 
Last edited:
Sorry for not seeing this earlier. Greed just uses older vcpkg libraries since it's based on nekiro downgrade. Just see this video, and download the correct vcpkg libraries from the link at the comment of the video (I think is against the rules to post links, so there it is)

If you still need help just message me on discord or send me a PM, by the way, Greed is my own fork.
 
Back
Top