• 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!

[C++/Linux] Compiling old engine (sources) on Debian 10 / Ubuntu 20.04

server is compile but weapons not work!!
What weapons don't work? They don't attack or what?

It looks like it compiled and generated theotxserver binary file.
There are just some warnings that some parts of code are useless/may generate problems in future.
 
i have this problem:
C++:
talkaction.cpp: In member function ‘bool TalkActions::onPlayerSay(Creature*, uint16_t, const string&, bool)’:
talkaction.cpp:122:3: error: ‘cmdstring’ was not declared in this scope
   cmdstring[TALKFILTER_QUOTATION] = std::string(words, 0, loc);
   ^~~~~~~~~
talkaction.cpp:122:3: note: suggested alternative: ‘trimString’
   cmdstring[TALKFILTER_QUOTATION] = std::string(words, 0, loc);
   ^~~~~~~~~
   trimString
talkaction.cpp:123:3: error: ‘paramstring’ was not declared in this scope
   paramstring[TALKFILTER_QUOTATION] = std::string(words, (loc + 1), (words.size() - (loc - 1)));
   ^~~~~~~~~~~
talkaction.cpp:123:3: note: suggested alternative: ‘trimString’
   paramstring[TALKFILTER_QUOTATION] = std::string(words, (loc + 1), (words.size() - (loc - 1)));
   ^~~~~~~~~~~
   trimString
talkaction.cpp:130:3: error: ‘cmdstring’ was not declared in this scope
   cmdstring[TALKFILTER_WORD] = std::string(words, 0, loc);
   ^~~~~~~~~
talkaction.cpp:130:3: note: suggested alternative: ‘trimString’
   cmdstring[TALKFILTER_WORD] = std::string(words, 0, loc);
   ^~~~~~~~~
   trimString
talkaction.cpp:131:3: error: ‘paramstring’ was not declared in this scope
   paramstring[TALKFILTER_WORD] = std::string(words, (loc + 1), (words.size() - (loc - 1)));
   ^~~~~~~~~~~
talkaction.cpp:131:3: note: suggested alternative: ‘trimString’
   paramstring[TALKFILTER_WORD] = std::string(words, (loc + 1), (words.size() - (loc - 1)));
   ^~~~~~~~~~~
   trimString
talkaction.cpp:144:19: error: ‘cmdstring’ was not declared in this scope
   if(it->first == cmdstring[it->second->getFilter()] || (!it->second->isSensitive() &&
                   ^~~~~~~~~
talkaction.cpp:144:19: note: suggested alternative: ‘trimString’
   if(it->first == cmdstring[it->second->getFilter()] || (!it->second->isSensitive() &&
                   ^~~~~~~~~
                   trimString
talkaction.cpp:179:43: error: ‘cmdstring’ was not declared in this scope
   return talkAction->executeSay(creature, cmdstring[talkAction->getFilter()], paramstring[talkAction->getFilter()], channelId);
                                           ^~~~~~~~~
talkaction.cpp:179:43: note: suggested alternative: ‘trimString’
   return talkAction->executeSay(creature, cmdstring[talkAction->getFilter()], paramstring[talkAction->getFilter()], channelId);
                                           ^~~~~~~~~
                                           trimString
talkaction.cpp:179:79: error: ‘paramstring’ was not declared in this scope
   return talkAction->executeSay(creature, cmdstring[talkAction->getFilter()], paramstring[talkAction->getFilter()], channelId);
                                                                               ^~~~~~~~~~~
talkaction.cpp:179:79: note: suggested alternative: ‘trimString’
   return talkAction->executeSay(creature, cmdstring[talkAction->getFilter()], paramstring[talkAction->getFilter()], channelId);
                                                                               ^~~~~~~~~~~
                                                                               trimString
talkaction.cpp:182:29: error: ‘cmdstring’ was not declared in this scope
   return function(creature, cmdstring[talkAction->getFilter()], paramstring[talkAction->getFilter()]);
                             ^~~~~~~~~
talkaction.cpp:182:29: note: suggested alternative: ‘trimString’
   return function(creature, cmdstring[talkAction->getFilter()], paramstring[talkAction->getFilter()]);
                             ^~~~~~~~~
                             trimString
talkaction.cpp:182:65: error: ‘paramstring’ was not declared in this scope
   return function(creature, cmdstring[talkAction->getFilter()], paramstring[talkAction->getFilter()]);
                                                                 ^~~~~~~~~~~
talkaction.cpp:182:65: note: suggested alternative: ‘trimString’
   return function(creature, cmdstring[talkAction->getFilter()], paramstring[talkAction->getFilter()]);
                                                                 ^~~~~~~~~~~
                                                                 trimString
 
i have this problem:
C++:
talkaction.cpp: In member function ‘bool TalkActions::onPlayerSay(Creature*, uint16_t, const string&, bool)’:
talkaction.cpp:122:3: error: ‘cmdstring’ was not declared in this scope
   cmdstring[TALKFILTER_QUOTATION] = std::string(words, 0, loc);
   ^~~~~~~~~
talkaction.cpp:122:3: note: suggested alternative: ‘trimString’
Looks like you did follow error no 8 fix, but in your sources variables are not named cmd and param, but cmdstring and paramstring.
You should skip error no 8 fix and do error no 16 fix.
 
Thanks a lot for the great tutorial @Gesior.pl

I have a problem while compiling TFS 0.3.5 on Ubuntu 20.04

Code:
selo@selo-Inspiron-3580:~/Desktop/0.3.5/source-war$ ./build.sh
The Forgotten Server build script -
Using ccache
CCache binaries located in /usr/lib/ccache

Start building on 8 cores, using 9 processes

make  all-am
make[1]: Entering directory '/home/selo/Desktop/0.3.5/source-war'
  CXX      game.o
  CXX      ioban.o
  CXX      ioguild.o
  CXX      iologindata.o
  CXX      iomap.o
  CXX      iomapserialize.o
  CXX      item.o
  CXX      itemattributes.o
  CXX      items.o
  CXX      luascript.o
  CXX      mailbox.o
  CXX      map.o
  CXX      md5.o
  CXX      monster.o
  CXX      monsters.o
  CXX      movement.o
  CXX      networkmessage.o
  CXX      npc.o
luascript.cpp: In static member function ‘static std::string LuaScriptInterface::getGlobalString(lua_State*, const string&, const string&)’:
luascript.cpp:1276:25: error: ‘lua_strlen’ was not declared in this scope; did you mean ‘u_strlen’?
 1276 |  int32_t len = (int32_t)lua_strlen(L, -1);
      |                         ^~~~~~~~~~
      |                         u_strlen
luascript.cpp: In member function ‘virtual void LuaScriptInterface::registerFunctions()’:
luascript.cpp:2370:2: error: ‘luaL_register’ was not declared in this scope; did you mean ‘lua_register’?
 2370 |  luaL_register(m_luaState, "db", LuaScriptInterface::luaDatabaseTable);
      |  ^~~~~~~~~~~~~
      |  lua_register
make[1]: *** [Makefile:551: luascript.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from game.cpp:18:
game.h: In member function ‘void Game::globalSave()’:
game.h:611:78: warning: iteration 2 invokes undefined behavior [-Waggressive-loop-optimizations]
  611 |   void setGlobalSaveMessage(int16_t key, bool value) {globalSaveMessage[key] = value;}
      |                                                       ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
game.cpp:6161:23: note: within this loop
 6161 |  for(int16_t i = 0; i < 3; i++)
      |                     ~~^~~
make[1]: Leaving directory '/home/selo/Desktop/0.3.5/source-war'
make: *** [Makefile:401: all] Error 2

Also here is the source code
If someone wanted to have a peek on it & to be reference for other members
 
Thanks a lot for the great tutorial @Gesior.pl

I have a problem while compiling TFS 0.3.5 on Ubuntu 20.04

Also here is the source code
If someone wanted to have a peek on it & to be reference for other members
A lot of errors. I fixed them, but I won't describe in this thread. 0.3.5 is not popular.
Download GitHub - BahaaAlhagar/0.3.5: TFS 0.3.5 Tibia 8.60 (https://github.com/BahaaAlhagar/0.3.5)
and replace files from .zip that I attached.
 

Attachments

Last edited:
hey gesior, do you have any idea with this error?
C++:
tools.cpp: In function ‘std::string transformToMD5(std::string, bool)’:
tools.cpp:43:2: error: ‘byte’ was not declared in this scope; did you mean ‘CryptoPP::byte’?
   43 |  byte digest[CryptoPP::Weak::MD5::DIGESTSIZE];
      |  ^~~~
      |  CryptoPP::byte
In file included from /usr/include/cryptopp/config.h:27,
                 from /usr/include/cryptopp/sha.h:11,
                 from tools.cpp:23:
/usr/include/cryptopp/config_int.h:56:23: note: ‘CryptoPP::byte’ declared here
   56 | typedef unsigned char byte;
      |                       ^~~~
tools.cpp:46:23: error: ‘digest’ was not declared in this scope; did you mean ‘sigset’?
   46 |  hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
      |                       ^~~~~~
      |                       sigset
tools.cpp:46:38: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
   46 |  hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
      |                                      ^~~~
tools.cpp:46:32: error: expected primary-expression before ‘const’
   46 |  hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
      |                                ^~~~~
tools.cpp:46:32: error: expected ‘)’ before ‘const’
   46 |  hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
      |                               ~^~~~~
      |                                )
tools.cpp: In function ‘std::string transformToSHA1(std::string, bool)’:
tools.cpp:73:2: error: ‘byte’ was not declared in this scope; did you mean ‘CryptoPP::byte’?
   73 |  byte digest[CryptoPP::SHA1::DIGESTSIZE];
      |  ^~~~
      |  CryptoPP::byte
In file included from /usr/include/cryptopp/config.h:27,
                 from /usr/include/cryptopp/sha.h:11,
                 from tools.cpp:23:
/usr/include/cryptopp/config_int.h:56:23: note: ‘CryptoPP::byte’ declared here
   56 | typedef unsigned char byte;
      |                       ^~~~
tools.cpp:76:23: error: ‘digest’ was not declared in this scope; did you mean ‘sigset’?
   76 |  hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
      |                       ^~~~~~
      |                       sigset
tools.cpp:76:38: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
   76 |  hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
      |                                      ^~~~
tools.cpp:76:32: error: expected primary-expression before ‘const’
   76 |  hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
      |                                ^~~~~
tools.cpp:76:32: error: expected ‘)’ before ‘const’
   76 |  hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
      |                               ~^~~~~
      |                                )
tools.cpp: In function ‘std::string transformToSHA256(std::string, bool)’:
tools.cpp:103:2: error: ‘byte’ was not declared in this scope; did you mean ‘CryptoPP::byte’?
  103 |  byte digest[CryptoPP::SHA256::DIGESTSIZE];
      |  ^~~~
      |  CryptoPP::byte
In file included from /usr/include/cryptopp/config.h:27,
                 from /usr/include/cryptopp/sha.h:11,
                 from tools.cpp:23:
/usr/include/cryptopp/config_int.h:56:23: note: ‘CryptoPP::byte’ declared here
   56 | typedef unsigned char byte;
      |                       ^~~~
tools.cpp:106:23: error: ‘digest’ was not declared in this scope; did you mean ‘sigset’?
  106 |  hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
      |                       ^~~~~~
      |                       sigset
tools.cpp:106:38: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
  106 |  hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
      |                                      ^~~~
tools.cpp:106:32: error: expected primary-expression before ‘const’
  106 |  hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
      |                                ^~~~~
tools.cpp:106:32: error: expected ‘)’ before ‘const’
  106 |  hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
      |                               ~^~~~~
      |                                )
tools.cpp: In function ‘std::string transformToSHA512(std::string, bool)’:
tools.cpp:133:2: error: ‘byte’ was not declared in this scope; did you mean ‘CryptoPP::byte’?
  133 |  byte digest[CryptoPP::SHA512::DIGESTSIZE];
      |  ^~~~
      |  CryptoPP::byte
In file included from /usr/include/cryptopp/config.h:27,
                 from /usr/include/cryptopp/sha.h:11,
                 from tools.cpp:23:
/usr/include/cryptopp/config_int.h:56:23: note: ‘CryptoPP::byte’ declared here
   56 | typedef unsigned char byte;
      |                       ^~~~
tools.cpp:136:23: error: ‘digest’ was not declared in this scope; did you mean ‘sigset’?
  136 |  hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
      |                       ^~~~~~
      |                       sigset
tools.cpp:136:38: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
  136 |  hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
      |                                      ^~~~
tools.cpp:136:32: error: expected primary-expression before ‘const’
  136 |  hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
      |                                ^~~~~
tools.cpp:136:32: error: expected ‘)’ before ‘const’
  136 |  hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
      |                               ~^~~~~
      |                                )
tools.cpp: In function ‘std::string transformToVAHash(std::string, bool)’:
tools.cpp:169:2: error: ‘byte’ was not declared in this scope; did you mean ‘CryptoPP::byte’?
  169 |  byte digest[CryptoPP::SHA512::DIGESTSIZE];
      |  ^~~~
      |  CryptoPP::byte
In file included from /usr/include/cryptopp/config.h:27,
                 from /usr/include/cryptopp/sha.h:11,
                 from tools.cpp:23:
/usr/include/cryptopp/config_int.h:56:23: note: ‘CryptoPP::byte’ declared here
   56 | typedef unsigned char byte;
      |                       ^~~~
tools.cpp:172:42: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
  172 |  CryptoPP::HMAC<CryptoPP::SHA512>((const byte*)key.c_str(), key.length()).CalculateDigest(
      |                                          ^~~~
tools.cpp:172:34: error: expected primary-expression before ‘(’ token
  172 |  CryptoPP::HMAC<CryptoPP::SHA512>((const byte*)key.c_str(), key.length()).CalculateDigest(
      |                                  ^
tools.cpp:172:42: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
  172 |  CryptoPP::HMAC<CryptoPP::SHA512>((const byte*)key.c_str(), key.length()).CalculateDigest(
      |                                          ^~~~
tools.cpp:172:36: error: expected primary-expression before ‘const’
  172 |  CryptoPP::HMAC<CryptoPP::SHA512>((const byte*)key.c_str(), key.length()).CalculateDigest(
      |                                    ^~~~~
tools.cpp:172:36: error: expected ‘)’ before ‘const’
  172 |  CryptoPP::HMAC<CryptoPP::SHA512>((const byte*)key.c_str(), key.length()).CalculateDigest(
      |                                   ~^~~~~
      |                                    )
tools.cpp:183:14: error: ‘digest’ was not declared in this scope; did you mean ‘sigset’?
  183 |  encoder.Put(digest, sizeof(digest));
      |              ^~~~~~
      |              sigset
tools.cpp: In function ‘uint32_t adlerChecksum(uint8_t*, size_t)’:
tools.cpp:1669:2: error: ‘byte’ was not declared in this scope; did you mean ‘CryptoPP::byte’?
 1669 |  byte digest[CryptoPP::Adler32::DIGESTSIZE];
      |  ^~~~
      |  CryptoPP::byte
In file included from /usr/include/cryptopp/config.h:27,
                 from /usr/include/cryptopp/sha.h:11,
                 from tools.cpp:23:
/usr/include/cryptopp/config_int.h:56:23: note: ‘CryptoPP::byte’ declared here
   56 | typedef unsigned char byte;
      |                       ^~~~
tools.cpp:1672:24: error: ‘digest’ was not declared in this scope; did you mean ‘sigset’?
 1672 |  adler.CalculateDigest(digest, (const byte*)data, length);
      |                        ^~~~~~
      |                        sigset
tools.cpp:1672:39: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
 1672 |  adler.CalculateDigest(digest, (const byte*)data, length);
      |                                       ^~~~
tools.cpp:1672:33: error: expected primary-expression before ‘const’
 1672 |  adler.CalculateDigest(digest, (const byte*)data, length);
      |                                 ^~~~~
tools.cpp:1672:33: error: expected ‘)’ before ‘const’
 1672 |  adler.CalculateDigest(digest, (const byte*)data, length);
      |                                ~^~~~~
      |                                 )
make[1]: *** [Makefile:595: tools.o] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/tile.Tpo .deps/tile.Po
 
@Womos
It's problem with CryptoPP version 8, which is default on Ubuntu 21.10. It's easy to fix.

In tools.cpp replace:
Code:
// Use native byte instead of casting chars
byte digest[CryptoPP::SHA1::DIGESTSIZE];

// Do the actual calculation, require a byte value so we need a cast
hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
with:
Code:
// Use native byte instead of casting chars
CryptoPP::byte digest[CryptoPP::SHA1::DIGESTSIZE];

// Do the actual calculation, require a byte value so we need a cast
hash.CalculateDigest(digest, (const CryptoPP::byte*)plainText.c_str(), plainText.length());
 
I have this error and I can't imagine what it is...

Code:
make[1]: Entering directory '/home/luanluciano93/sources'
  CXX      player.o
player.cpp: In member function ‘ItemVector Player::getWeapons() const’:
player.cpp:353:5: error: this statement may fall through [-Werror=implicit-fallthrough=]
  353 |     }
      |     ^
player.cpp:356:4: note: here
  356 |    default:
      |    ^~~~~~~
cc1plus: all warnings being treated as errors
make[1]: *** [Makefile:606: player.o] Error 1

1647540548560.png
 
I have this error and I can't imagine what it is...

Code:
make[1]: Entering directory '/home/luanluciano93/sources'
  CXX      player.o
player.cpp: In member function ‘ItemVector Player::getWeapons() const’:
player.cpp:353:5: error: this statement may fall through [-Werror=implicit-fallthrough=]
  353 |     }
      |     ^
player.cpp:356:4: note: here
  356 |    default:
      |    ^~~~~~~
cc1plus: all warnings being treated as errors
make[1]: *** [Makefile:606: player.o] Error 1

View attachment 66259
Point 10:
10) Random C++ errors - warnings handled as errors, because of configuration.
Before you start searching on forum, why it does not compile, edit file makefile.am:
Search and remove:
Code:
-Wall
Code:
-Werror
Code:
-Wextra


About error. You probably has something like that:
C++:
ItemVector Player::getWeapons() const
{
   Item* item = NULL;
   ItemVector weapons;
   for(int32_t slot = SLOT_RIGHT; slot <= SLOT_LEFT; ++slot)
   {
      if(!(item = getEquippedItem((slots_t)slot)))
         continue;

      switch(item->getWeaponType())
      {
         case WEAPON_DIST:
            if(item->getAmmoType() != AMMO_NONE)
               break;

         case WEAPON_SWORD:
         case WEAPON_CLUB:
         case WEAPON_AXE:
         case WEAPON_FIST:
         case WEAPON_WAND:
         {
            if(g_weapons->getWeapon(item))
               weapons.push_back(item);

            break;
         }

         default:
            break;
      }
   }

   return weapons;
}
As you can see here:
C++:
         case WEAPON_DIST:
            if(item->getAmmoType() != AMMO_NONE)
               break;
it may 'go into case' and not execute break, if item is distance weapon, but it has some ammo type.
As it does not stop on break, it continues switch code and go to:
Code:
         default:
            break;
which is reported as fall through warning. It may work as intended, but getting into 2 case in one switch is reported as probably bugged code.

I don't know what is logic behind this break in if in TFS 0.4. It looks like it does not change anything. No matter, if it gets into this if or not, it will not return any distance weapon.
 
Last edited:
Hi.
Maybe You have idea what is the problem:
C++:
g++ -I/usr/include/libxml2  -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D_THREAD_SAFE -D_REENTRANT -Wno-strict-aliasing -pipe  -L/usr/local/lib -o theforgottenserver actions.o  allocator.o baseevents.o beds.o chat.o combat.o condition.o configmanager.o connection.o container.o creature.o creatureevent.o cylinder.o database.o databasemanager.o databasemysql.o  depot.o dispatcher.o exception.o fileloader.o game.o  globalevent.o group.o house.o housetile.o ioban.o ioguild.o iologindata.o iomap.o iomapserialize.o item.o itemattributes.o items.o luascript.o mailbox.o manager.o map.o monster.o monsters.o movement.o networkmessage.o npc.o otserv.o outfit.o outputmessage.o party.o player.o position.o protocol.o protocolgame.o protocolhttp.o protocollogin.o protocolold.o quests.o raids.o rsa.o scheduler.o scriptmanager.o server.o spawn.o spells.o status.o talkaction.o teleport.o textlogger.o thing.o tile.o tools.o trashholder.o waitlist.o weapons.o vocation.o -llua5.1 -lmysqlclient -lcrypto -lboost_filesystem -lboost_date_time -lboost_system -lboost_regex -lboost_thread -lz -lgmp  -lxml2 -lpthread
/usr/bin/ld: house.o: in function `char const* boost::re_detail_106600::re_is_set_member<char const*, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(char const*, char const*, boost::re_detail_106600::re_set_long<unsigned int> const*, boost::re_detail_106600::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool)':
house.cpp:(.text._ZN5boost16re_detail_10660016re_is_set_memberIPKccNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_S8_S8_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb[_ZN5boost16re_detail_10660016re_is_set_memberIPKccNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_S8_S8_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb]+0x1f6): undefined reference to `boost::re_detail_106600::cpp_regex_traits_implementation<char>::transform_primary[abi:cxx11](char const*, char const*) const'
/usr/bin/ld: house.cpp:(.text._ZN5boost16re_detail_10660016re_is_set_memberIPKccNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_S8_S8_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb[_ZN5boost16re_detail_10660016re_is_set_memberIPKccNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_S8_S8_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb]+0x398): undefined reference to `boost::re_detail_106600::cpp_regex_traits_implementation<char>::transform[abi:cxx11](char const*, char const*) const'
I am using boost 1.66. Which will be most suitable version of boost?
 
Hi.
Maybe You have idea what is the problem:
C++:
g++ -I/usr/include/libxml2  -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D_THREAD_SAFE -D_REENTRANT -Wno-strict-aliasing -pipe  -L/usr/local/lib -o theforgottenserver actions.o  allocator.o baseevents.o beds.o chat.o combat.o condition.o configmanager.o connection.o container.o creature.o creatureevent.o cylinder.o database.o databasemanager.o databasemysql.o  depot.o dispatcher.o exception.o fileloader.o game.o  globalevent.o group.o house.o housetile.o ioban.o ioguild.o iologindata.o iomap.o iomapserialize.o item.o itemattributes.o items.o luascript.o mailbox.o manager.o map.o monster.o monsters.o movement.o networkmessage.o npc.o otserv.o outfit.o outputmessage.o party.o player.o position.o protocol.o protocolgame.o protocolhttp.o protocollogin.o protocolold.o quests.o raids.o rsa.o scheduler.o scriptmanager.o server.o spawn.o spells.o status.o talkaction.o teleport.o textlogger.o thing.o tile.o tools.o trashholder.o waitlist.o weapons.o vocation.o -llua5.1 -lmysqlclient -lcrypto -lboost_filesystem -lboost_date_time -lboost_system -lboost_regex -lboost_thread -lz -lgmp  -lxml2 -lpthread
/usr/bin/ld: house.o: in function `char const* boost::re_detail_106600::re_is_set_member<char const*, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(char const*, char const*, boost::re_detail_106600::re_set_long<unsigned int> const*, boost::re_detail_106600::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool)':
house.cpp:(.text._ZN5boost16re_detail_10660016re_is_set_memberIPKccNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_S8_S8_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb[_ZN5boost16re_detail_10660016re_is_set_memberIPKccNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_S8_S8_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb]+0x1f6): undefined reference to `boost::re_detail_106600::cpp_regex_traits_implementation<char>::transform_primary[abi:cxx11](char const*, char const*) const'
/usr/bin/ld: house.cpp:(.text._ZN5boost16re_detail_10660016re_is_set_memberIPKccNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_S8_S8_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb[_ZN5boost16re_detail_10660016re_is_set_memberIPKccNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_S8_S8_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb]+0x398): undefined reference to `boost::re_detail_106600::cpp_regex_traits_implementation<char>::transform[abi:cxx11](char const*, char const*) const'
I am using boost 1.66. Which will be most suitable version of boost?
What engine is it? What operating system?
Looks like linker problem.
 
Ubuntu 20.04, TFS 0.4 rev 3777 (with some of your fixes).
I know that this is linker problem, but I can't get why. I think there is problem with "too new" version of boost (or maybe I have to recompile boost 1.66 with proper flags)
 
pomocy
checking for boost/unordered_set.hpp... no
configure: error: "boost::unordered_set header not found."
blad debian 10 vps / tfs 0.3.6
 
C++:
../../src/raids.cpp: In member function ‘bool Raid::loadFromXml(const string&)’:
../../src/raids.cpp:239:17: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream<char>::__ostream_type’ {aka ‘std::basic_ostream<char>’} and ‘std::ostream’ {aka ‘std::basic_ostream<char>’})
   std::clog << "[Error - Raid::loadFromXml] Could not load raid file " << _filename
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    << std::endl << std::clog << getLastXMLError() << std::endl;
    ~~~~~~~~~~~~~^~~~~~
../../src/raids.cpp:239:17: note: candidate: ‘operator<<(int, int)’ <built-in>
../../src/raids.cpp:239:17: note:   no known conversion for argument 2 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘int’
In file included from /usr/include/c++/8/istream:39,
                 from /usr/include/c++/8/sstream:38,
                 from /usr/include/c++/8/complex:45,
                 from /usr/include/boost/detail/container_fwd.hpp:98,
                 from /usr/include/boost/container_hash/extensions.hpp:22,
                 from /usr/include/boost/container_hash/hash.hpp:760,
                 from /usr/include/boost/type_index/stl_type_index.hpp:43,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/function/function_base.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function.hpp:30,
                 from ../../src/otpch.h:35,
                 from ../../src/raids.cpp:17:
/usr/include/c++/8/ostream:108:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ostream_type& (*)(std::basic_ostream<_CharT, _Traits>::__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(__ostream_type& (*__pf)(__ostream_type&))
       ^~~~~~~~
/usr/include/c++/8/ostream:108:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)’ {aka ‘std::basic_ostream<char>& (*)(std::basic_ostream<char>&)’}
/usr/include/c++/8/ostream:117:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ios_type& (*)(std::basic_ostream<_CharT, _Traits>::__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>; std::basic_ostream<_CharT, _Traits>::__ios_type = std::basic_ios<char>]’
       operator<<(__ios_type& (*__pf)(__ios_type&))
       ^~~~~~~~
/usr/include/c++/8/ostream:117:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)’ {aka ‘std::basic_ios<char>& (*)(std::basic_ios<char>&)’}
/usr/include/c++/8/ostream:127:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(ios_base& (*__pf) (ios_base&))
       ^~~~~~~~
/usr/include/c++/8/ostream:127:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘std::ios_base& (*)(std::ios_base&)’
/usr/include/c++/8/ostream:166:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(long __n)
       ^~~~~~~~
/usr/include/c++/8/ostream:166:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘long int’
/usr/include/c++/8/ostream:170:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(unsigned long __n)
       ^~~~~~~~
/usr/include/c++/8/ostream:170:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘long unsigned int’
/usr/include/c++/8/ostream:174:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(bool __n)
       ^~~~~~~~
/usr/include/c++/8/ostream:174:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘bool’
In file included from /usr/include/c++/8/ostream:693,
                 from /usr/include/c++/8/istream:39,
                 from /usr/include/c++/8/sstream:38,
                 from /usr/include/c++/8/complex:45,
                 from /usr/include/boost/detail/container_fwd.hpp:98,
                 from /usr/include/boost/container_hash/extensions.hpp:22,
                 from /usr/include/boost/container_hash/hash.hpp:760,
                 from /usr/include/boost/type_index/stl_type_index.hpp:43,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/function/function_base.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function.hpp:30,
                 from ../../src/otpch.h:35,
                 from ../../src/raids.cpp:17:
/usr/include/c++/8/bits/ostream.tcc:91:5: note: candidate: ‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]’
     basic_ostream<_CharT, _Traits>::
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/ostream.tcc:91:5: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘short int’
In file included from /usr/include/c++/8/istream:39,
                 from /usr/include/c++/8/sstream:38,
                 from /usr/include/c++/8/complex:45,
                 from /usr/include/boost/detail/container_fwd.hpp:98,
                 from /usr/include/boost/container_hash/extensions.hpp:22,
                 from /usr/include/boost/container_hash/hash.hpp:760,
                 from /usr/include/boost/type_index/stl_type_index.hpp:43,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/function/function_base.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function.hpp:30,
                 from ../../src/otpch.h:35,
                 from ../../src/raids.cpp:17:
/usr/include/c++/8/ostream:181:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(unsigned short __n)
       ^~~~~~~~
/usr/include/c++/8/ostream:181:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘short unsigned int’
In file included from /usr/include/c++/8/ostream:693,
                 from /usr/include/c++/8/istream:39,
                 from /usr/include/c++/8/sstream:38,
                 from /usr/include/c++/8/complex:45,
                 from /usr/include/boost/detail/container_fwd.hpp:98,
                 from /usr/include/boost/container_hash/extensions.hpp:22,
                 from /usr/include/boost/container_hash/hash.hpp:760,
                 from /usr/include/boost/type_index/stl_type_index.hpp:43,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/function/function_base.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function.hpp:30,
                 from ../../src/otpch.h:35,
                 from ../../src/raids.cpp:17:
/usr/include/c++/8/bits/ostream.tcc:105:5: note: candidate: ‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]’
     basic_ostream<_CharT, _Traits>::
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/ostream.tcc:105:5: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘int’
In file included from /usr/include/c++/8/istream:39,
                 from /usr/include/c++/8/sstream:38,
                 from /usr/include/c++/8/complex:45,
                 from /usr/include/boost/detail/container_fwd.hpp:98,
                 from /usr/include/boost/container_hash/extensions.hpp:22,
                 from /usr/include/boost/container_hash/hash.hpp:760,
                 from /usr/include/boost/type_index/stl_type_index.hpp:43,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/function/function_base.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function.hpp:30,
                 from ../../src/otpch.h:35,
                 from ../../src/raids.cpp:17:
/usr/include/c++/8/ostream:192:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(unsigned int __n)
       ^~~~~~~~
/usr/include/c++/8/ostream:192:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘unsigned int’
/usr/include/c++/8/ostream:201:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(long long __n)
       ^~~~~~~~
/usr/include/c++/8/ostream:201:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘long long int’
/usr/include/c++/8/ostream:205:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(unsigned long long __n)
       ^~~~~~~~
/usr/include/c++/8/ostream:205:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘long long unsigned int’
/usr/include/c++/8/ostream:220:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(double __f)
       ^~~~~~~~
/usr/include/c++/8/ostream:220:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘double’
/usr/include/c++/8/ostream:224:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(float __f)
       ^~~~~~~~
/usr/include/c++/8/ostream:224:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘float’
/usr/include/c++/8/ostream:232:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(long double __f)
       ^~~~~~~~
/usr/include/c++/8/ostream:232:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘long double’
/usr/include/c++/8/ostream:245:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(const void* __p)
       ^~~~~~~~
/usr/include/c++/8/ostream:245:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘const void*’
In file included from /usr/include/c++/8/ostream:693,
                 from /usr/include/c++/8/istream:39,
                 from /usr/include/c++/8/sstream:38,
                 from /usr/include/c++/8/complex:45,
                 from /usr/include/boost/detail/container_fwd.hpp:98,
                 from /usr/include/boost/container_hash/extensions.hpp:22,
                 from /usr/include/boost/container_hash/hash.hpp:760,
                 from /usr/include/boost/type_index/stl_type_index.hpp:43,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/function/function_base.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function.hpp:30,
                 from ../../src/otpch.h:35,
                 from ../../src/raids.cpp:17:
/usr/include/c++/8/bits/ostream.tcc:119:5: note: candidate: ‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>]’
     basic_ostream<_CharT, _Traits>::
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/ostream.tcc:119:5: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘std::basic_ostream<char>::__streambuf_type*’ {aka ‘std::basic_streambuf<char>*’}
In file included from ../../src/luascript.h:43,
                 from ../../src/configmanager.h:20,
                 from ../../src/otpch.h:40,
                 from ../../src/raids.cpp:17:
../../src/position.h:117:15: note: candidate: ‘std::ostream& operator<<(std::ostream&, const Position&)’
 std::ostream& operator<<(std::ostream&, const Position&);
               ^~~~~~~~
../../src/position.h:117:15: note:   no known conversion for argument 2 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘const Position&’
../../src/position.h:118:15: note: candidate: ‘std::ostream& operator<<(std::ostream&, const Direction&)’
 std::ostream& operator<<(std::ostream&, const Direction&);
               ^~~~~~~~
../../src/position.h:118:15: note:   no known conversion for argument 2 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘const Direction&’
In file included from /usr/include/c++/8/string:52,
                 from /usr/include/c++/8/stdexcept:39,
                 from /usr/include/c++/8/array:39,
                 from /usr/include/c++/8/tuple:39,
                 from /usr/include/c++/8/functional:54,
                 from /usr/include/boost/function.hpp:23,
                 from ../../src/otpch.h:35,
                 from ../../src/raids.cpp:17:
/usr/include/c++/8/bits/basic_string.h:6323:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)’
     operator<<(basic_ostream<_CharT, _Traits>& __os,
     ^~~~~~~~
 
C++:
../../src/raids.cpp: In member function ‘bool Raid::loadFromXml(const string&)’:
../../src/raids.cpp:239:17: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream<char>::__ostream_type’ {aka ‘std::basic_ostream<char>’} and ‘std::ostream’ {aka ‘std::basic_ostream<char>’})
   std::clog << "[Error - Raid::loadFromXml] Could not load raid file " << _filename
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    << std::endl << std::clog << getLastXMLError() << std::endl;
    ~~~~~~~~~~~~~^~~~~~
../../src/raids.cpp:239:17: note: candidate: ‘operator<<(int, int)’ <built-in>
../../src/raids.cpp:239:17: note:   no known conversion for argument 2 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘int’
In file included from /usr/include/c++/8/istream:39,
                 from /usr/include/c++/8/sstream:38,
                 from /usr/include/c++/8/complex:45,
                 from /usr/include/boost/detail/container_fwd.hpp:98,
                 from /usr/include/boost/container_hash/extensions.hpp:22,
                 from /usr/include/boost/container_hash/hash.hpp:760,
                 from /usr/include/boost/type_index/stl_type_index.hpp:43,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/function/function_base.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function.hpp:30,
                 from ../../src/otpch.h:35,
                 from ../../src/raids.cpp:17:
/usr/include/c++/8/ostream:108:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ostream_type& (*)(std::basic_ostream<_CharT, _Traits>::__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(__ostream_type& (*__pf)(__ostream_type&))
       ^~~~~~~~
/usr/include/c++/8/ostream:108:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&)’ {aka ‘std::basic_ostream<char>& (*)(std::basic_ostream<char>&)’}
/usr/include/c++/8/ostream:117:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ios_type& (*)(std::basic_ostream<_CharT, _Traits>::__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>; std::basic_ostream<_CharT, _Traits>::__ios_type = std::basic_ios<char>]’
       operator<<(__ios_type& (*__pf)(__ios_type&))
       ^~~~~~~~
/usr/include/c++/8/ostream:117:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&)’ {aka ‘std::basic_ios<char>& (*)(std::basic_ios<char>&)’}
/usr/include/c++/8/ostream:127:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(ios_base& (*__pf) (ios_base&))
       ^~~~~~~~
/usr/include/c++/8/ostream:127:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘std::ios_base& (*)(std::ios_base&)’
/usr/include/c++/8/ostream:166:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(long __n)
       ^~~~~~~~
/usr/include/c++/8/ostream:166:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘long int’
/usr/include/c++/8/ostream:170:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(unsigned long __n)
       ^~~~~~~~
/usr/include/c++/8/ostream:170:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘long unsigned int’
/usr/include/c++/8/ostream:174:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(bool __n)
       ^~~~~~~~
/usr/include/c++/8/ostream:174:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘bool’
In file included from /usr/include/c++/8/ostream:693,
                 from /usr/include/c++/8/istream:39,
                 from /usr/include/c++/8/sstream:38,
                 from /usr/include/c++/8/complex:45,
                 from /usr/include/boost/detail/container_fwd.hpp:98,
                 from /usr/include/boost/container_hash/extensions.hpp:22,
                 from /usr/include/boost/container_hash/hash.hpp:760,
                 from /usr/include/boost/type_index/stl_type_index.hpp:43,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/function/function_base.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function.hpp:30,
                 from ../../src/otpch.h:35,
                 from ../../src/raids.cpp:17:
/usr/include/c++/8/bits/ostream.tcc:91:5: note: candidate: ‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]’
     basic_ostream<_CharT, _Traits>::
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/ostream.tcc:91:5: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘short int’
In file included from /usr/include/c++/8/istream:39,
                 from /usr/include/c++/8/sstream:38,
                 from /usr/include/c++/8/complex:45,
                 from /usr/include/boost/detail/container_fwd.hpp:98,
                 from /usr/include/boost/container_hash/extensions.hpp:22,
                 from /usr/include/boost/container_hash/hash.hpp:760,
                 from /usr/include/boost/type_index/stl_type_index.hpp:43,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/function/function_base.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function.hpp:30,
                 from ../../src/otpch.h:35,
                 from ../../src/raids.cpp:17:
/usr/include/c++/8/ostream:181:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(unsigned short __n)
       ^~~~~~~~
/usr/include/c++/8/ostream:181:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘short unsigned int’
In file included from /usr/include/c++/8/ostream:693,
                 from /usr/include/c++/8/istream:39,
                 from /usr/include/c++/8/sstream:38,
                 from /usr/include/c++/8/complex:45,
                 from /usr/include/boost/detail/container_fwd.hpp:98,
                 from /usr/include/boost/container_hash/extensions.hpp:22,
                 from /usr/include/boost/container_hash/hash.hpp:760,
                 from /usr/include/boost/type_index/stl_type_index.hpp:43,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/function/function_base.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function.hpp:30,
                 from ../../src/otpch.h:35,
                 from ../../src/raids.cpp:17:
/usr/include/c++/8/bits/ostream.tcc:105:5: note: candidate: ‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]’
     basic_ostream<_CharT, _Traits>::
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/ostream.tcc:105:5: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘int’
In file included from /usr/include/c++/8/istream:39,
                 from /usr/include/c++/8/sstream:38,
                 from /usr/include/c++/8/complex:45,
                 from /usr/include/boost/detail/container_fwd.hpp:98,
                 from /usr/include/boost/container_hash/extensions.hpp:22,
                 from /usr/include/boost/container_hash/hash.hpp:760,
                 from /usr/include/boost/type_index/stl_type_index.hpp:43,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/function/function_base.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function.hpp:30,
                 from ../../src/otpch.h:35,
                 from ../../src/raids.cpp:17:
/usr/include/c++/8/ostream:192:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(unsigned int __n)
       ^~~~~~~~
/usr/include/c++/8/ostream:192:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘unsigned int’
/usr/include/c++/8/ostream:201:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(long long __n)
       ^~~~~~~~
/usr/include/c++/8/ostream:201:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘long long int’
/usr/include/c++/8/ostream:205:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(unsigned long long __n)
       ^~~~~~~~
/usr/include/c++/8/ostream:205:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘long long unsigned int’
/usr/include/c++/8/ostream:220:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(double __f)
       ^~~~~~~~
/usr/include/c++/8/ostream:220:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘double’
/usr/include/c++/8/ostream:224:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(float __f)
       ^~~~~~~~
/usr/include/c++/8/ostream:224:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘float’
/usr/include/c++/8/ostream:232:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(long double __f)
       ^~~~~~~~
/usr/include/c++/8/ostream:232:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘long double’
/usr/include/c++/8/ostream:245:7: note: candidate: ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]’
       operator<<(const void* __p)
       ^~~~~~~~
/usr/include/c++/8/ostream:245:7: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘const void*’
In file included from /usr/include/c++/8/ostream:693,
                 from /usr/include/c++/8/istream:39,
                 from /usr/include/c++/8/sstream:38,
                 from /usr/include/c++/8/complex:45,
                 from /usr/include/boost/detail/container_fwd.hpp:98,
                 from /usr/include/boost/container_hash/extensions.hpp:22,
                 from /usr/include/boost/container_hash/hash.hpp:760,
                 from /usr/include/boost/type_index/stl_type_index.hpp:43,
                 from /usr/include/boost/type_index.hpp:29,
                 from /usr/include/boost/function/function_base.hpp:21,
                 from /usr/include/boost/function/detail/prologue.hpp:17,
                 from /usr/include/boost/function.hpp:30,
                 from ../../src/otpch.h:35,
                 from ../../src/raids.cpp:17:
/usr/include/c++/8/bits/ostream.tcc:119:5: note: candidate: ‘std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>]’
     basic_ostream<_CharT, _Traits>::
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/8/bits/ostream.tcc:119:5: note:   no known conversion for argument 1 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘std::basic_ostream<char>::__streambuf_type*’ {aka ‘std::basic_streambuf<char>*’}
In file included from ../../src/luascript.h:43,
                 from ../../src/configmanager.h:20,
                 from ../../src/otpch.h:40,
                 from ../../src/raids.cpp:17:
../../src/position.h:117:15: note: candidate: ‘std::ostream& operator<<(std::ostream&, const Position&)’
 std::ostream& operator<<(std::ostream&, const Position&);
               ^~~~~~~~
../../src/position.h:117:15: note:   no known conversion for argument 2 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘const Position&’
../../src/position.h:118:15: note: candidate: ‘std::ostream& operator<<(std::ostream&, const Direction&)’
 std::ostream& operator<<(std::ostream&, const Direction&);
               ^~~~~~~~
../../src/position.h:118:15: note:   no known conversion for argument 2 from ‘std::ostream’ {aka ‘std::basic_ostream<char>’} to ‘const Direction&’
In file included from /usr/include/c++/8/string:52,
                 from /usr/include/c++/8/stdexcept:39,
                 from /usr/include/c++/8/array:39,
                 from /usr/include/c++/8/tuple:39,
                 from /usr/include/c++/8/functional:54,
                 from /usr/include/boost/function.hpp:23,
                 from ../../src/otpch.h:35,
                 from ../../src/raids.cpp:17:
/usr/include/c++/8/bits/basic_string.h:6323:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)’
     operator<<(basic_ostream<_CharT, _Traits>& __os,
     ^~~~~~~~
same error just fix raids.cpp:

C++:
bool Raid::loadFromXml(const std::string& _filename)
{
    if(isLoaded())
        return true;

    xmlDocPtr doc = xmlParseFile(_filename.c_str());
    if(!doc)
    {
        std::clog << "[Error - Raid::loadFromXml] Could not load raid file (" << _filename << ")." << std::endl;
        std::clog << getLastXMLError() << std::endl;
        return false;
    }
her bro i just fixed that last error u had and thats it im in compiled for my distro TFS 0.4.5.6

anyways dealing with this now:

2023-02-18_23-34-40.642507 [23:34:40.642] > ERROR: Unable to load items (OTB)! 2023-02-18_23-34-40.941889 theforgottenserver: /usr/include/boost/thread/pthread/condition_variable_fwd.hpp:85: boost::condition_variable::~condition_variable(): Assertion `!ret' failed.
 
Last edited:
Back
Top