• 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.X+ TFS 1.2 Compiling 8.60

DaBlauwk

Psychedelic
Joined
Jun 9, 2014
Messages
41
Reaction score
4
Location
The Moon
Hi
Had to rebuild because I made some changes for crystal coin to change into gold nugget but that doesn't seem to be the problem.
I'm using Visual Studio 2017 with boost 1.66.0 and tfs-sdk-3.2
Failing rebuild
OUTPUT
Code:
1>c:\psychoactive\src\connection.cpp(119): error C2440: '<function-style-cast>': cannot convert from 'Connection::<unnamed-enum-read_timeout>' to 'boost::posix_time::seconds'
1>c:\psychoactive\src\connection.cpp(119): note: No constructor could take the source type, or constructor overload resolution was ambiguous
1>c:\psychoactive\src\connection.cpp(159): error C2440: '<function-style-cast>': cannot convert from 'Connection::<unnamed-enum-read_timeout>' to 'boost::posix_time::seconds'
1>c:\psychoactive\src\connection.cpp(159): note: No constructor could take the source type, or constructor overload resolution was ambiguous
1>c:\psychoactive\src\connection.cpp(222): error C2440: '<function-style-cast>': cannot convert from 'Connection::<unnamed-enum-read_timeout>' to 'boost::posix_time::seconds'
1>c:\psychoactive\src\connection.cpp(222): note: No constructor could take the source type, or constructor overload resolution was ambiguous
1>c:\psychoactive\src\connection.cpp(254): error C2440: '<function-style-cast>': cannot convert from 'Connection::<unnamed-enum-write_timeout>' to 'boost::posix_time::seconds'
1>c:\psychoactive\src\connection.cpp(254): note: No constructor could take the source type, or constructor overload resolution was ambiguous

ERROR LOG
Code:
Error    C2440    '<function-style-cast>': cannot convert from 'Connection::<unnamed-enum-write_timeout>' to 'boost::posix_time::seconds'    theforgottenserver    c:\psychoactive\src\connection.cpp
 
@jo3binghams answer solved the failed rebuild.

But now when opening forgottenserver.exe I receive below issue, meaning boost_date_time-vc142-mt-x64-1_70.dll cannot be found.
37732

Using older build of TFS but 1.2~.
Using boost version 1_62_0

Anyone has any ideas how to pass this?
 
Just download the missing DLL depends on your TFS version 64/32 and add it to your server then it should run properly.
 
What version you are using 32/64? and I think you can find it in the boost folder or vcpkg if you are using it
 
Build started...
1>------ Build started: Project: theforgottenserver, Configuration: Release x64 ------
1>connection.cpp
1>LINK : fatal error LNK1181: cannot open input file 'libmysql.lib'
1>Done building project "theforgottenserver.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
i know its old but faster way and less invasive will be to edit the enums like that

connection.h around line 66
C++:
enum { write_timeout = 30 };
enum { read_timeout = 30 };
to
C++:
static constexpr int32_t write_timeout = 30;
static constexpr int32_t read_timeout = 30;

was using it in older versions of forgotten server like 1.2 and it works like a charm :)
PS. you editing them at the same lines do not move it outside :) then you dont need to edit anything else
 
1>combat.obj : error LNK2019: unresolved external symbol "public: class Weapon const * __cdecl Weapons::getWeapon(class Item const *)const " (?getWeapon@Weapons@@QEBAPEBVWeapon@@PEBVItem@@@Z) referenced in function "public: void __cdecl ValueCallback::getMinMaxValues(class Player *,struct CombatDamage &,bool)const " (?getMinMaxValues@ValueCallback@@QEBAXPEAVPlayer@@AEAUCombatDamage@@_N@Z)
1>player.obj : error LNK2001: unresolved external symbol "public: class Weapon const * __cdecl Weapons::getWeapon(class Item const *)const " (?getWeapon@Weapons@@QEBAPEBVWeapon@@PEBVItem@@@Z)
1>commands.obj : error LNK2019: unresolved external symbol "public: void __cdecl Weapons::loadDefaults(void)" (?loadDefaults@Weapons@@QEAAXXZ) referenced in function "public: bool __cdecl Commands::exeCommand(class Player &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?exeCommand@Commands@@QEAA_NAEAVPlayer@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>items.obj : error LNK2001: unresolved external symbol "public: void __cdecl Weapons::loadDefaults(void)" (?loadDefaults@Weapons@@QEAAXXZ)
1>scriptmanager.obj : error LNK2001: unresolved external symbol "public: void __cdecl Weapons::loadDefaults(void)" (?loadDefaults@Weapons@@QEAAXXZ)
1>game.obj : error LNK2019: unresolved external symbol "public: void __cdecl ProtocolSpectator::sendCastMessage(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,enum SpeakClasses,class std::shared_ptr<class ProtocolGame>)" (?sendCastMessage@ProtocolSpectator@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0W4SpeakClasses@@V?$shared_ptr@VProtocolGame@@@3@@Z) referenced in function "public: void __cdecl Game::playerSay(unsigned int,unsigned short,enum SpeakClasses,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?playerSay@Game@@QEAAXIGW4SpeakClasses@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@1@Z)
1>luascript.obj : error LNK2019: unresolved external symbol "public: void __cdecl ProtocolSpectator::kick(class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,unsigned int,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,unsigned int> > > const &)" (?kick@ProtocolSpectator@@QEAAXAEBV?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IU?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@I@std@@@2@@std@@@Z) referenced in function "protected: static int __cdecl LuaScriptInterface::luaPlayerSetSpectators(struct lua_State *)" (?luaPlayerSetSpectators@LuaScriptInterface@@KAHPEAUlua_State@@@Z)
1>luascript.obj : error LNK2019: unresolved external symbol "public: void __cdecl ProtocolSpectator::ban(class std::map<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,unsigned int,struct std::less<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >,class std::allocator<struct std::pair<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const ,unsigned int> > > const &)" (?ban@ProtocolSpectator@@QEAAXAEBV?$map@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IU?$less@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@V?$allocator@U?$pair@$$CBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@I@std@@@2@@std@@@Z) referenced in function "protected: static int __cdecl LuaScriptInterface::luaPlayerSetSpectators(struct lua_State *)" (?luaPlayerSetSpectators@LuaScriptInterface@@KAHPEAUlua_State@@@Z)
1>luascript.obj : error LNK2019: unresolved external symbol "public: void __cdecl ProtocolSpectator::setBroadcast(bool)" (?setBroadcast@ProtocolSpectator@@QEAAX_N@Z) referenced in function "protected: static int __cdecl LuaScriptInterface::luaPlayerSetSpectators(struct lua_State *)" (?luaPlayerSetSpectators@LuaScriptInterface@@KAHPEAUlua_State@@@Z)
1>player.obj : error LNK2001: unresolved external symbol "public: void __cdecl ProtocolSpectator::setBroadcast(bool)" (?setBroadcast@ProtocolSpectator@@QEAAX_N@Z)
1>monsters.obj : error LNK2019: unresolved external symbol "public: static int __cdecl Weapons::getMaxMeleeDamage(int,int)" (?getMaxMeleeDamage@Weapons@@SAHHH@Z) referenced in function "private: bool __cdecl Monsters::deserializeSpell(class pugi::xml_node const &,struct spellBlock_t &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?deserializeSpell@Monsters@@AEAA_NAEBVxml_node@pugi@@AEAUspellBlock_t@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>player.obj : error LNK2019: unresolved external symbol "public: static bool __cdecl Weapon::useFist(class Player *,class Creature *)" (?useFist@Weapon@@SA_NPEAVPlayer@@PEAVCreature@@@Z) referenced in function "public: virtual void __cdecl Player::doAttacking(unsigned int)" (?doAttacking@Player@@UEAAXI@Z)
1>protocolgame.obj : error LNK2019: unresolved external symbol "public: void __cdecl ProtocolSpectator::addSpectator(class std::shared_ptr<class ProtocolGame>)" (?addSpectator@ProtocolSpectator@@QEAAXV?$shared_ptr@VProtocolGame@@@std@@@Z) referenced in function "public: void __cdecl ProtocolGame::spectate(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?spectate@ProtocolGame@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z)
1>protocolgame.obj : error LNK2019: unresolved external symbol "public: void __cdecl ProtocolSpectator::removeSpectator(class std::shared_ptr<class ProtocolGame>)" (?removeSpectator@ProtocolSpectator@@QEAAXV?$shared_ptr@VProtocolGame@@@std@@@Z) referenced in function "private: virtual void __cdecl ProtocolGame::release(void)" (?release@ProtocolGame@@EEAAXXZ)
1>protocolgame.obj : error LNK2019: unresolved external symbol "public: void __cdecl ProtocolSpectator::spectatorSay(class std::shared_ptr<class ProtocolGame>,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?spectatorSay@ProtocolSpectator@@QEAAXV?$shared_ptr@VProtocolGame@@@std@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@3@@Z) referenced in function "private: void __cdecl ProtocolGame::spectatorSay(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,unsigned short)" (?spectatorSay@ProtocolGame@@AEAAXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@G@Z)
1>protocolgame.obj : error LNK2019: unresolved external symbol "public: bool __cdecl ProtocolSpectator::isBanned(unsigned int)const " (?isBanned@ProtocolSpectator@@QEBA_NI@Z) referenced in function "public: void __cdecl ProtocolGame::spectate(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?spectate@ProtocolGame@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z)
1>scriptmanager.obj : error LNK2019: unresolved external symbol "public: __cdecl Weapons::Weapons(void)" (??0Weapons@@QEAA@XZ) referenced in function "public: bool __cdecl ScriptingManager::loadScriptSystems(void)" (?loadScriptSystems@ScriptingManager@@QEAA_NXZ)
1>scriptmanager.obj : error LNK2019: unresolved external symbol "public: virtual __cdecl Weapons::~Weapons(void)" (??1Weapons@@UEAA@XZ) referenced in function "public: virtual void * __cdecl Weapons::`scalar deleting destructor'(unsigned int)" (??_GWeapons@@UEAAPEAXI@Z)
 
that looks like a problem with libraries that you include in project try to reinstall them and add links to them in your project make sure there are no duplicates
 
Back
Top