• 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

@Gsp
Looks like you did some wrong changes in protocol.h and protocol.cpp. There should be declared Protocol::RSA_decrypt
or somehow your ProtocolGame and ProtocolOld classes do not 'extend' Protocol class.
It looks almost impossible, as that method was already there in 0.4. My changes only added second version with different parameters.

If you still need help, message me on Discord: Gesior.pl#3208
(I will post information how to fix that problem when we find it out)
 
@Gesior.pl Thank you for your response. I was able to fix all three errors by adding:

bool ProtocolGame::parseFirstPacket(NetworkMessage& msg)
{
if(g_game.getGameState() == GAMESTATE_SHUTDOWN)
{
getConnection()->close();
return false;
}

OperatingSystem_t operatingSystem = (OperatingSystem_t)msg.get<uint16_t>();
uint16_t version = msg.get<uint16_t>();
#ifdef _MULTIPLATFORM77
if(!RSA_decrypt(msg))
{
getConnection()->close();
return false;
}

uint32_t key[4] = {msg.get<uint32_t>(), msg.get<uint32_t>(), msg.get<uint32_t>(), msg.get<uint32_t>()};
#endif

these 2 lines like this way.
Then I got another error.

Bash:
g++ -I/usr/include/libxml2   -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT   -Wno-strict-aliasing -Wno-unused-parameter -pipe   -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 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  -lmysqlclient -llua -lcrypto -lcryptopp -lboost_filesystem -lboost_date_time -lboost_system -lboost_regex -lboost_thread -lz -lgmp  -lxml2 -lpthread -lgmp -ldl -lgmp
/usr/bin/ld: otserv.o: warning: relocation against `_ZTV13ProtocolLogin' in read-only section `.text._ZNK7ServiceI13ProtocolLoginE12makeProtocolEN5boost10shared_ptrI10ConnectionEE[_ZNK7ServiceI13ProtocolLoginE12makeProtocolEN5boost10shared_ptrI10ConnectionEE]'
/usr/bin/ld: otserv.o: in function `Service<ProtocolLogin>::makeProtocol(boost::shared_ptr<Connection>) const':
otserv.cpp:(.text._ZNK7ServiceI13ProtocolLoginE12makeProtocolEN5boost10shared_ptrI10ConnectionEE[_ZNK7ServiceI13ProtocolLoginE12makeProtocolEN5boost10shared_ptrI10ConnectionEE]+0x99): undefined reference to `vtable for ProtocolLogin'
/usr/bin/ld: otserv.cpp:(.text._ZNK7ServiceI13ProtocolLoginE12makeProtocolEN5boost10shared_ptrI10ConnectionEE[_ZNK7ServiceI13ProtocolLoginE12makeProtocolEN5boost10shared_ptrI10ConnectionEE]+0xea): undefined reference to `vtable for ProtocolLogin'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:504: theforgottenserver] Error 1
make[1]: Leaving directory '/root/source'
make: *** [Makefile:446: all] Error 2

I'm not good at reading this kind of errors so this was confusing. I thought it may be a gcc issue or a boost problem, i downgraded the boost to 1.55, it was still the same. I tried adding some flags, didnt work. I tried including
#include <boost/utility.hpp>
#include <boost/asio.hpp>
#include <boost/thread.hpp>
#include <boost/foreach.hpp>
#include <boost/shared_ptr.hpp>
in related files, didnt work. Then I opened the otserv.cpp and removed this line below

{
services->add<ProtocolLogin>(g_config.getNumber(ConfigManager::LOGIN_PORT), ipList);
services->add<ProtocolOldLogin>(g_config.getNumber(ConfigManager::LOGIN_PORT), ipList);
}

services->add<ProtocolGame>(g_config.getNumber(ConfigManager::GAME_PORT), ipList);
services->add<ProtocolOldGame>(g_config.getNumber(ConfigManager::LOGIN_PORT), ipList);
std::clog << "> Bound ports: ";

after this I was able to compile it but I'm not sure if players will be able to log in lol
 
@Gsp
About that error:
Code:
/usr/bin/ld: otserv.o: in function `Service<ProtocolLogin>::makeProtocol(boost::shared_ptr<Connection>) const':
If you remove that line, players won't be able to login to account (list characters).
I got no idea what that error means, but I would remove all files .o from directory and try to compile again.

As I see, you are running some engine with multiprotocol support:
Code:
#ifdef _MULTIPLATFORM77
It's harder to apply RSA changes, because you must check original code and copy all extra #ifdef to valid places in my code.
 
Thank you Gesior. I give up. I'll try switching to your engine and see what happens.

@Gesior.pl After many hours of editing I was able to compile my old engine on Debian 11. Thank you once again for creating this guide.
My advice to people who are going to edit TFS 0.4 3884 is to use this release as your base. I copied most of the codes from there to my source and edited them according to this guide. Gesior's source is advanced, 3884 is simple and outdated, that one i linked is between these two.

Last error I got was

g++ -I/usr/include/libxml2 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D_THREAD_SAFE -D_REENTRANT -g -Wno-strict-aliasing -Wno-unused-parameter -pipe -o theforgottenserver rsa.o 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 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 -lmysqlclient -llua -lcryptopp -lboost_filesystem -lboost_date_time -lboost_system -lboost_regex -lboost_thread -lz -lgmp -lxml2 -pthread -lpthread
/usr/bin/ld: /usr/local/lib/liblua.a(loadlib.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/bin/ld: /lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
adding -ldl to flags instantly fixed the problem.

on tools.cpp I had to make some changes on this part
seems to be working now for me.

C++:
std::string transformToSHA1(std::string plainText, bool upperCase)
{
    // Crypto++ SHA1 object
    CryptoPP::SHA1 hash;
    // 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, (CryptoPP::byte*)plainText.c_str(), plainText.length());
    // Crypto++ HexEncoder object
    CryptoPP::HexEncoder encoder;
    // Our output
    std::string output;
    // Encode to base64
    encoder.Attach(new CryptoPP::StringSink(output));
    encoder.Put(digest, sizeof(digest));
    encoder.MessageEnd();

    // Make sure we want uppercase
    if(upperCase)
        return output;

    // Convert to lowercase if needed
    return asLowerCaseString(output);
}
 
could you help us to compile on debian 11 @Gesior.pl
even on start i got a problem:
E: Unable to locate package libcrypto++6
 
could you help us to compile on debian 11 @Gesior.pl
even on start i got a problem:
E: Unable to locate package libcrypto++6
On Debian 11 there is version 8, not 6. You can try to compile using it. Replace:
Code:
libcrypto++6
with:
Code:
libcrypto++8
 
no, tell me if u got

But link dead...
 

But link dead...
What is a problem? Author of that 'fix' did not describe what was a problem.
 
Hello, all compiles without problems but if i run ./theforgottenserver then i have this error:
theforgottenserver: /usr/include/boost/thread/pthread/condition_variable_fwd.hpp:81: boost::condition_variable::~condition_variable(): Assertion `!posix::pthread_mutex_destroy(&internal_mutex)' failed.
Aborted (core dumped)


logs from gdb:

Thread 2 "theforgottenserver" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff4e2e700 (LWP 28952)]
0x00007ffff77904fa in std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&) () from /lib/x86_64-linux-gnu/libstdc++.so.6
 
Last edited:
Got more than half way through, and now Im stuck at this error @Gesior.pl

C++:
g

g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__   -D__WAR_SYSTEM__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -Wno-unused-parameter -Wno-array-bounds -pthread -Wno-deprecated -pipe -c -o player.o player.cpp
In file included from player.h:20,
                 from player.cpp:20:
otsystem.h: In function ‘int64_t OTSYS_TIME()’:
otsystem.h:115:10: warning: ‘int ftime(timeb*)’ is deprecated [-Wdeprecated-declarations]
  115 |  ftime(&t);
      |          ^
In file included from otsystem.h:76,
                 from player.h:20,
                 from player.cpp:20:
/usr/include/x86_64-linux-gnu/sys/timeb.h:39:12: note: declared here
   39 | extern int ftime (struct timeb *__timebuf)
      |            ^~~~~
In file included from player.h:20,
                 from player.cpp:20:
otsystem.h:115:10: warning: ‘int ftime(timeb*)’ is deprecated [-Wdeprecated-declarations]
  115 |  ftime(&t);
      |          ^
In file included from otsystem.h:76,
                 from player.h:20,
                 from player.cpp:20:
/usr/include/x86_64-linux-gnu/sys/timeb.h:39:12: note: declared here
   39 | extern int ftime (struct timeb *__timebuf)
      |            ^~~~~
In file included from /usr/include/boost/math/policies/policy.hpp:29,
                 from /usr/include/boost/math/special_functions/math_fwd.hpp:29,
                 from /usr/include/boost/math/special_functions/sign.hpp:17,
                 from /usr/include/boost/lexical_cast/detail/inf_nan.hpp:34,
                 from /usr/include/boost/lexical_cast/detail/converter_lexical_streams.hpp:63,
                 from /usr/include/boost/lexical_cast/detail/converter_lexical.hpp:54,
                 from /usr/include/boost/lexical_cast/try_lexical_convert.hpp:44,
                 from /usr/include/boost/lexical_cast.hpp:32,
                 from player.cpp:38:
/usr/include/c++/9/math.h: At global scope:
/usr/include/c++/9/math.h:107:12: error: ‘constexpr float std::round(float)’ conflicts with a previous declaration
  107 | using std::round;
      |            ^~~~~
In file included from map.h:20,
                 from creature.h:28,
                 from player.h:23,
                 from player.cpp:20:
tools.h:99:9: note: previous declaration ‘int32_t round(float)’
   99 | int32_t round(float v);
      |         ^~~~~
player.cpp: In member function ‘ItemVector Player::getWeapons() const’:
player.cpp:346:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
  346 |     if(item->getAmmoType() != AMMO_NONE)
      |     ^~
player.cpp:349:4: note: here
  349 |    case WEAPON_SWORD:
      |    ^~~~
make[1]: *** [Makefile:594: player.o] Error 1
 
Last edited:
Got more than half way through, and now Im stuck at this error @Gesior.pl

C++:
g

g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__   -D__WAR_SYSTEM__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -Wno-unused-parameter -Wno-array-bounds -pthread -Wno-deprecated -pipe -c -o player.o player.cpp
In file included from player.h:20,
                 from player.cpp:20:
otsystem.h: In function ‘int64_t OTSYS_TIME()’:
otsystem.h:115:10: warning: ‘int ftime(timeb*)’ is deprecated [-Wdeprecated-declarations]
  115 |  ftime(&t);
      |          ^
In file included from otsystem.h:76,
                 from player.h:20,
                 from player.cpp:20:
/usr/include/x86_64-linux-gnu/sys/timeb.h:39:12: note: declared here
   39 | extern int ftime (struct timeb *__timebuf)
      |            ^~~~~
In file included from player.h:20,
                 from player.cpp:20:
otsystem.h:115:10: warning: ‘int ftime(timeb*)’ is deprecated [-Wdeprecated-declarations]
  115 |  ftime(&t);
      |          ^
In file included from otsystem.h:76,
                 from player.h:20,
                 from player.cpp:20:
/usr/include/x86_64-linux-gnu/sys/timeb.h:39:12: note: declared here
   39 | extern int ftime (struct timeb *__timebuf)
      |            ^~~~~
In file included from /usr/include/boost/math/policies/policy.hpp:29,
                 from /usr/include/boost/math/special_functions/math_fwd.hpp:29,
                 from /usr/include/boost/math/special_functions/sign.hpp:17,
                 from /usr/include/boost/lexical_cast/detail/inf_nan.hpp:34,
                 from /usr/include/boost/lexical_cast/detail/converter_lexical_streams.hpp:63,
                 from /usr/include/boost/lexical_cast/detail/converter_lexical.hpp:54,
                 from /usr/include/boost/lexical_cast/try_lexical_convert.hpp:44,
                 from /usr/include/boost/lexical_cast.hpp:32,
                 from player.cpp:38:
/usr/include/c++/9/math.h: At global scope:
/usr/include/c++/9/math.h:107:12: error: ‘constexpr float std::round(float)’ conflicts with a previous declaration
  107 | using std::round;
      |            ^~~~~
In file included from map.h:20,
                 from creature.h:28,
                 from player.h:23,
                 from player.cpp:20:
tools.h:99:9: note: previous declaration ‘int32_t round(float)’
   99 | int32_t round(float v);
      |         ^~~~~
player.cpp: In member function ‘ItemVector Player::getWeapons() const’:
player.cpp:346:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
  346 |     if(item->getAmmoType() != AMMO_NONE)
      |     ^~
player.cpp:349:4: note: here
  349 |    case WEAPON_SWORD:
      |    ^~~~
make[1]: *** [Makefile:594: player.o] Error 1
In some file (maybe tools.cpp and tools.h) there is declared function round. You should remove it, as in new version of C++ std library there is already defined round function.
 
In some file (maybe tools.cpp and tools.h) there is declared function round. You should remove it, as in new version of C++ std library there is already defined round function.
Thank you so much, continued and followed the remaining errors with the first post. I believe it is trying to build the application now, but I have this error.


C++:
g++ -I/usr/include/libxml2  -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__   -D__WAR_SYSTEM__ -D_THREAD_SAFE -D_REENTRANT -Wno-strict-aliasing -Wno-unused-parameter -Wno-array-bounds -pthread -Wno-deprecated -Wdeprecated-declarations -pipe   -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  -lgmp -lpthread
/usr/bin/ld: baseevents.o: in function `BaseEvents::loadFromXml()':
baseevents.cpp:(.text+0x1ae1): undefined reference to `xmlParseFile'
/usr/bin/ld: baseevents.cpp:(.text+0x1b3d): undefined reference to `xmlDocGetRootElement'
/usr/bin/ld: baseevents.cpp:(.text+0x1b4e): undefined reference to `xmlStrcmp'
/usr/bin/ld: baseevents.cpp:(.text+0x1c2a): undefined reference to `xmlFreeDoc'
/usr/bin/ld: baseevents.cpp:(.text+0x1da4): undefined reference to `xmlFreeDoc'
/usr/bin/ld: chat.o: in function `Chat::parseChannelNode(_xmlNode*)':
chat.cpp:(.text+0x2653): undefined reference to `xmlStrcmp'
/usr/bin/ld: chat.o: in function `Chat::loadFromXml()':
chat.cpp:(.text+0x349a): undefined reference to `xmlParseFile'
/usr/bin/ld: chat.cpp:(.text+0x34cc): undefined reference to `xmlDocGetRootElement'
/usr/bin/ld: chat.cpp:(.text+0x34df): undefined reference to `xmlStrcmp'
/usr/bin/ld: chat.cpp:(.text+0x3510): undefined reference to `xmlFreeDoc'
/usr/bin/ld: chat.cpp:(.text+0x3671): undefined reference to `xmlFreeDoc'
/usr/bin/ld: game.o: in function `Game::loadExperienceStages()':
game.cpp:(.text+0x15c8b): undefined reference to `xmlParseFile'
/usr/bin/ld: game.cpp:(.text+0x15cd9): undefined reference to `xmlDocGetRootElement'
/usr/bin/ld: game.cpp:(.text+0x15cec): undefined reference to `xmlStrcmp'
/usr/bin/ld: game.cpp:(.text+0x15e54): undefined reference to `xmlStrcmp'
/usr/bin/ld: game.cpp:(.text+0x15e6c): undefined reference to `xmlStrcmp'
/usr/bin/ld: game.cpp:(.text+0x15e8a): undefined reference to `xmlFreeDoc'
/usr/bin/ld: game.cpp:(.text+0x15fd1): undefined reference to `xmlStrcmp'
/usr/bin/ld: game.cpp:(.text+0x163db): undefined reference to `xmlFreeDoc'
/usr/bin/ld: group.o: in function `Groups::parseGroupNode(_xmlNode*)':
group.cpp:(.text+0x41a): undefined reference to `xmlStrcmp'
/usr/bin/ld: group.o: in function `Groups::loadFromXml()':
group.cpp:(.text+0x90b): undefined reference to `xmlParseFile'
/usr/bin/ld: group.cpp:(.text+0x93d): undefined reference to `xmlDocGetRootElement'
/usr/bin/ld: group.cpp:(.text+0x950): undefined reference to `xmlStrcmp'
/usr/bin/ld: group.cpp:(.text+0x980): undefined reference to `xmlFreeDoc'
/usr/bin/ld: group.cpp:(.text+0xae1): undefined reference to `xmlFreeDoc'
/usr/bin/ld: house.o: in function `Houses::loadFromXml(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
house.cpp:(.text+0x2d56): undefined reference to `xmlParseFile'
/usr/bin/ld: house.cpp:(.text+0x2d6c): undefined reference to `xmlDocGetRootElement'
/usr/bin/ld: house.cpp:(.text+0x2d7f): undefined reference to `xmlStrcmp'
/usr/bin/ld: house.cpp:(.text+0x2ea8): undefined reference to `xmlStrcmp'
/usr/bin/ld: house.cpp:(.text+0x31b5): undefined reference to `xmlFreeDoc'
/usr/bin/ld: house.cpp:(.text+0x3342): undefined reference to `xmlFreeDoc'
/usr/bin/ld: house.cpp:(.text+0x33b2): undefined reference to `xmlFreeDoc'
/usr/bin/ld: item.o: in function `Item::loadItem(_xmlNode*, Container*)':
item.cpp:(.text+0x2a3f): undefined reference to `xmlStrcmp'
/usr/bin/ld: item.o: in function `Item::loadContainer(_xmlNode*, Container*)':
item.cpp:(.text+0x3047): undefined reference to `xmlStrcmp'
/usr/bin/ld: items.o: in function `Items::loadFromXml()':
items.cpp:(.text+0x501c): undefined reference to `xmlParseFile'
/usr/bin/ld: items.cpp:(.text+0x50f1): undefined reference to `xmlParseFile'
/usr/bin/ld: items.cpp:(.text+0x513c): undefined reference to `xmlDocGetRootElement'
/usr/bin/ld: items.cpp:(.text+0x5149): undefined reference to `xmlDocGetRootElement'
/usr/bin/ld: items.cpp:(.text+0x515e): undefined reference to `xmlStrcmp'
/usr/bin/ld: items.cpp:(.text+0x517b): undefined reference to `xmlStrcmp'
/usr/bin/ld: items.cpp:(.text+0x5248): undefined reference to `xmlStrcmp'
/usr/bin/ld: items.cpp:(.text+0x5315): undefined reference to `xmlFreeDoc'
/usr/bin/ld: items.cpp:(.text+0x5425): undefined reference to `xmlFreeDoc'
/usr/bin/ld: items.cpp:(.text+0x542f): undefined reference to `xmlFreeDoc'
/usr/bin/ld: items.cpp:(.text+0x5509): undefined reference to `xmlStrcmp'
/usr/bin/ld: items.cpp:(.text+0x551d): undefined reference to `xmlStrcmp'
/usr/bin/ld: items.cpp:(.text+0x5716): undefined reference to `xmlFreeDoc'
/usr/bin/ld: items.cpp:(.text+0x5d55): undefined reference to `xmlFreeDoc'
/usr/bin/ld: items.cpp:(.text+0x5d5f): undefined reference to `xmlFreeDoc'
/usr/bin/ld: monsters.o: in function `Monsters::deserializeSpell(_xmlNode*, spellBlock_t&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
monsters.cpp:(.text+0x1c51): undefined reference to `xmlStrcmp'
/usr/bin/ld: monsters.cpp:(.text+0x2596): undefined reference to `xmlStrcmp'
/usr/bin/ld: monsters.cpp:(.text+0x28d7): undefined reference to `xmlStrcmp'
/usr/bin/ld: monsters.o: in function `Monsters::loadChildLoot(_xmlNode*, LootBlock&)':
monsters.cpp:(.text+0x3860): undefined reference to `xmlStrcmp'
/usr/bin/ld: monsters.o: in function `Monsters::loadMonster(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)':
monsters.cpp:(.text+0x4795): undefined reference to `xmlParseFile'
/usr/bin/ld: monsters.cpp:(.text+0x47ad): undefined reference to `xmlDocGetRootElement'
/usr/bin/ld: monsters.cpp:(.text+0x47c0): undefined reference to `xmlStrcmp'
/usr/bin/ld: monsters.cpp:(.text+0x4a4a): undefined reference to `xmlStrcmp'
/usr/bin/ld: monsters.cpp:(.text+0x4ab6): undefined reference to `xmlFreeDoc'
/usr/bin/ld: monsters.cpp:(.text+0x4b1d): undefined reference to `xmlStrcmp'
/usr/bin/ld: monsters.cpp:(.text+0x4b32): undefined reference to `xmlStrcmp'
/usr/bin/ld: monsters.cpp:(.text+0x4bc9): undefined reference to `xmlStrcmp'
/usr/bin/ld: monsters.cpp:(.text+0x52ed): undefined reference to `xmlStrcmp'
/usr/bin/ld: monsters.cpp:(.text+0x54e3): undefined reference to `xmlFreeDoc'
/usr/bin/ld: monsters.cpp:(.text+0x58cd): undefined reference to `xmlStrcmp'
/usr/bin/ld: monsters.cpp:(.text+0x627d): undefined reference to `xmlStrcmp'
/usr/bin/ld: monsters.cpp:(.text+0x6296): undefined reference to `xmlStrcmp'
/usr/bin/ld: monsters.cpp:(.text+0x62af): undefined reference to `xmlStrcmp'
/usr/bin/ld: monsters.cpp:(.text+0x62c8): undefined reference to `xmlStrcmp'
/usr/bin/ld: monsters.o:monsters.cpp:(.text+0x6349): more undefined references to `xmlStrcmp' follow
/usr/bin/ld: monsters.o: in function `Monsters::loadFromXml(bool)':
monsters.cpp:(.text+0x86bc): undefined reference to `xmlParseFile'
/usr/bin/ld: monsters.cpp:(.text+0x8703): undefined reference to `xmlDocGetRootElement'
/usr/bin/ld: monsters.cpp:(.text+0x8716): undefined reference to `xmlStrcmp'
/usr/bin/ld: monsters.cpp:(.text+0x876f): undefined reference to `xmlStrcmp'
/usr/bin/ld: monsters.cpp:(.text+0x8804): undefined reference to `xmlFreeDoc'
/usr/bin/ld: monsters.cpp:(.text+0x8b8d): undefined reference to `xmlFreeDoc'
/usr/bin/ld: npc.o: in function `Npc::loadInteraction[abi:cxx11](_xmlNode*)':
npc.cpp:(.text+0x9964): undefined reference to `xmlStrcmp'
/usr/bin/ld: npc.cpp:(.text+0x9a14): undefined reference to `xmlStrcmp'
/usr/bin/ld: npc.cpp:(.text+0x9b04): undefined reference to `xmlStrcmp'
/usr/bin/ld: npc.cpp:(.text+0x9ec5): undefined reference to `xmlStrcmp'
/usr/bin/ld: npc.cpp:(.text+0x9ef4): undefined reference to `xmlStrcmp'
/usr/bin/ld: npc.o:npc.cpp:(.text+0x9f2d): more undefined references to `xmlStrcmp' follow
/usr/bin/ld: npc.o: in function `Npc::loadInteraction[abi:cxx11](_xmlNode*)':
npc.cpp:(.text+0xa04b): undefined reference to `xmlParseFile'
/usr/bin/ld: npc.cpp:(.text+0xa093): undefined reference to `xmlDocGetRootElement'
/usr/bin/ld: npc.cpp:(.text+0xa0a6): undefined reference to `xmlStrcmp'
/usr/bin/ld: npc.cpp:(.text+0xa109): undefined reference to `xmlFreeDoc'
/usr/bin/ld: npc.cpp:(.text+0xa2a1): undefined reference to `xmlStrcmp'
/usr/bin/ld: npc.cpp:(.text+0xa365): undefined reference to `xmlStrcmp'
/usr/bin/ld: npc.cpp:(.text+0xa666): undefined reference to `xmlStrcmp'
/usr/bin/ld: npc.cpp:(.text+0xbdd5): undefined reference to `xmlStrcmp'
/usr/bin/ld: npc.cpp:(.text+0xc689): undefined reference to `xmlStrcmp'
/usr/bin/ld: npc.o: in function `Npc::loadFromXml(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
npc.cpp:(.text+0xd7b2): undefined reference to `xmlParseFile'
/usr/bin/ld: npc.cpp:(.text+0xd7ca): undefined reference to `xmlDocGetRootElement'
/usr/bin/ld: npc.cpp:(.text+0xd7dd): undefined reference to `xmlStrcmp'
/usr/bin/ld: npc.cpp:(.text+0xdd19): undefined reference to `xmlStrcmp'
/usr/bin/ld: npc.cpp:(.text+0xdd2d): undefined reference to `xmlStrcmp'
/usr/bin/ld: npc.cpp:(.text+0xde2c): undefined reference to `xmlFreeDoc'
/usr/bin/ld: npc.cpp:(.text+0xe114): undefined reference to `xmlStrcmp'
/usr/bin/ld: npc.cpp:(.text+0xe12c): undefined reference to `xmlStrcmp'
/usr/bin/ld: npc.cpp:(.text+0xe144): undefined reference to `xmlStrcmp'
/usr/bin/ld: npc.cpp:(.text+0xe2bb): undefined reference to `xmlStrcmp'
/usr/bin/ld: npc.cpp:(.text+0xe52d): undefined reference to `xmlFreeDoc'
/usr/bin/ld: npc.cpp:(.text+0xe579): undefined reference to `xmlStrcmp'
/usr/bin/ld: outfit.o: in function `Outfits::parseOutfitNode(_xmlNode*)':
outfit.cpp:(.text+0x285): undefined reference to `xmlStrcmp'
/usr/bin/ld: outfit.cpp:(.text+0x671): undefined reference to `xmlStrcmp'
/usr/bin/ld: outfit.cpp:(.text+0x1141): undefined reference to `xmlStrcmp'
/usr/bin/ld: outfit.cpp:(.text+0x1159): undefined reference to `xmlStrcmp'
/usr/bin/ld: outfit.o:outfit.cpp:(.text+0x1adc): more undefined references to `xmlStrcmp' follow
/usr/bin/ld: outfit.o: in function `Outfits::loadFromXml()':
outfit.cpp:(.text+0x4180): undefined reference to `xmlParseFile'
/usr/bin/ld: outfit.cpp:(.text+0x41b2): undefined reference to `xmlDocGetRootElement'
/usr/bin/ld: outfit.cpp:(.text+0x41c5): undefined reference to `xmlStrcmp'
/usr/bin/ld: outfit.cpp:(.text+0x41f8): undefined reference to `xmlFreeDoc'
/usr/bin/ld: outfit.cpp:(.text+0x4361): undefined reference to `xmlFreeDoc'
/usr/bin/ld: quests.o: in function `Quests::parseQuestNode(_xmlNode*, bool)':
quests.cpp:(.text+0x596): undefined reference to `xmlStrcmp'
/usr/bin/ld: quests.cpp:(.text+0x806): undefined reference to `xmlStrcmp'
/usr/bin/ld: quests.cpp:(.text+0xa85): undefined reference to `xmlStrcmp'
/usr/bin/ld: quests.o: in function `Quests::loadFromXml()':
quests.cpp:(.text+0xf5b): undefined reference to `xmlParseFile'
/usr/bin/ld: quests.cpp:(.text+0xf8d): undefined reference to `xmlDocGetRootElement'
/usr/bin/ld: quests.cpp:(.text+0xfa0): undefined reference to `xmlStrcmp'
/usr/bin/ld: quests.cpp:(.text+0xfd2): undefined reference to `xmlFreeDoc'
/usr/bin/ld: quests.cpp:(.text+0x1131): undefined reference to `xmlFreeDoc'
/usr/bin/ld: raids.o: in function `AreaSpawnEvent::configureRaidEvent(_xmlNode*)':
raids.cpp:(.text+0x2259): undefined reference to `xmlStrcmp'
/usr/bin/ld: raids.o: in function `Raid::loadFromXml(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
raids.cpp:(.text+0x377a): undefined reference to `xmlParseFile'
/usr/bin/ld: raids.cpp:(.text+0x378e): undefined reference to `xmlDocGetRootElement'
/usr/bin/ld: raids.cpp:(.text+0x37a1): undefined reference to `xmlStrcmp'
/usr/bin/ld: raids.cpp:(.text+0x3915): undefined reference to `xmlStrcmp'
/usr/bin/ld: raids.cpp:(.text+0x392d): undefined reference to `xmlStrcmp'
/usr/bin/ld: raids.cpp:(.text+0x3a74): undefined reference to `xmlFreeDoc'
/usr/bin/ld: raids.cpp:(.text+0x3aac): undefined reference to `xmlStrcmp'
/usr/bin/ld: raids.cpp:(.text+0x3b84): undefined reference to `xmlStrcmp'
/usr/bin/ld: raids.cpp:(.text+0x3b9c): undefined reference to `xmlStrcmp'
/usr/bin/ld: raids.cpp:(.text+0x3d9f): undefined reference to `xmlFreeDoc'
/usr/bin/ld: raids.cpp:(.text+0x3dbc): undefined reference to `xmlStrcmp'
/usr/bin/ld: raids.o: in function `Raids::parseRaidNode(_xmlNode*, bool, FileType_t)':
raids.cpp:(.text+0x3ee0): undefined reference to `xmlStrcmp'
/usr/bin/ld: raids.o: in function `Raids::loadFromXml()':
raids.cpp:(.text+0x49a3): undefined reference to `xmlParseFile'
/usr/bin/ld: raids.cpp:(.text+0x49d5): undefined reference to `xmlDocGetRootElement'
/usr/bin/ld: raids.cpp:(.text+0x49e8): undefined reference to `xmlStrcmp'
/usr/bin/ld: raids.cpp:(.text+0x4a25): undefined reference to `xmlFreeDoc'
/usr/bin/ld: raids.cpp:(.text+0x4ac8): undefined reference to `xmlFreeDoc'
/usr/bin/ld: scriptmanager.o: in function `ScriptManager::loadFromXml(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool&)':
scriptmanager.cpp:(.text+0x427): undefined reference to `xmlParseFile'
/usr/bin/ld: scriptmanager.cpp:(.text+0x464): undefined reference to `xmlDocGetRootElement'
/usr/bin/ld: scriptmanager.cpp:(.text+0x477): undefined reference to `xmlStrcmp'
/usr/bin/ld: scriptmanager.cpp:(.text+0x6e3): undefined reference to `xmlStrcmp'
/usr/bin/ld: scriptmanager.cpp:(.text+0x6f7): undefined reference to `xmlStrcmp'
/usr/bin/ld: scriptmanager.cpp:(.text+0x72c): undefined reference to `xmlStrcmp'
/usr/bin/ld: scriptmanager.cpp:(.text+0x744): undefined reference to `xmlStrcmp'
/usr/bin/ld: scriptmanager.cpp:(.text+0x93b): undefined reference to `xmlFreeDoc'
/usr/bin/ld: scriptmanager.cpp:(.text+0xb75): undefined reference to `xmlFreeDoc'
/usr/bin/ld: scriptmanager.cpp:(.text+0xc9c): undefined reference to `xmlStrcmp'
/usr/bin/ld: scriptmanager.cpp:(.text+0xd5c): undefined reference to `xmlStrcmp'
/usr/bin/ld: scriptmanager.cpp:(.text+0xd70): undefined reference to `xmlStrcmp'
/usr/bin/ld: scriptmanager.cpp:(.text+0xefc): undefined reference to `xmlStrcmp'
/usr/bin/ld: scriptmanager.cpp:(.text+0x10a4): undefined reference to `xmlStrcmp'
/usr/bin/ld: scriptmanager.o:scriptmanager.cpp:(.text+0x10bc): more undefined references to `xmlStrcmp' follow
/usr/bin/ld: spawn.o: in function `Spawns::loadFromXml(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
spawn.cpp:(.text+0x1611): undefined reference to `xmlParseFile'
/usr/bin/ld: spawn.cpp:(.text+0x1621): undefined reference to `xmlDocGetRootElement'
/usr/bin/ld: spawn.cpp:(.text+0x1634): undefined reference to `xmlStrcmp'
/usr/bin/ld: spawn.cpp:(.text+0x1670): undefined reference to `xmlFreeDoc'
/usr/bin/ld: spawn.cpp:(.text+0x17b5): undefined reference to `xmlFreeDoc'
/usr/bin/ld: status.o: in function `Status::getStatusString[abi:cxx11](bool) const':
status.cpp:(.text+0xb1): undefined reference to `xmlNewDoc'
/usr/bin/ld: status.cpp:(.text+0xcc): undefined reference to `xmlNewDocNode'
/usr/bin/ld: status.cpp:(.text+0xe9): undefined reference to `xmlSetProp'
/usr/bin/ld: status.cpp:(.text+0xf7): undefined reference to `xmlNewNode'
/usr/bin/ld: status.cpp:(.text+0x16c): undefined reference to `xmlSetProp'
/usr/bin/ld: status.cpp:(.text+0x18f): undefined reference to `xmlSetProp'
/usr/bin/ld: status.cpp:(.text+0x1b2): undefined reference to `xmlSetProp'
/usr/bin/ld: status.cpp:(.text+0x1f3): undefined reference to `xmlSetProp'
/usr/bin/ld: status.cpp:(.text+0x216): undefined reference to `xmlSetProp'
/usr/bin/ld: status.o:status.cpp:(.text+0x239): more undefined references to `xmlSetProp' follow
/usr/bin/ld: status.o: in function `Status::getStatusString[abi:cxx11](bool) const':
status.cpp:(.text+0x286): undefined reference to `xmlAddChild'
/usr/bin/ld: status.cpp:(.text+0x294): undefined reference to `xmlNewNode'
/usr/bin/ld: status.cpp:(.text+0x2ba): undefined reference to `xmlSetProp'
/usr/bin/ld: status.cpp:(.text+0x2dd): undefined reference to `xmlSetProp'
/usr/bin/ld: status.cpp:(.text+0x2e8): undefined reference to `xmlAddChild'
/usr/bin/ld: status.cpp:(.text+0x2f6): undefined reference to `xmlNewNode'
/usr/bin/ld: status.cpp:(.text+0x32d): undefined reference to `xmlSetProp'
/usr/bin/ld: status.cpp:(.text+0x36e): undefined reference to `xmlSetProp'
/usr/bin/ld: status.cpp:(.text+0x3a2): undefined reference to `xmlSetProp'
/usr/bin/ld: status.cpp:(.text+0x7d7): undefined reference to `xmlNodeSetContent'
/usr/bin/ld: status.cpp:(.text+0x8d7): undefined reference to `xmlAddChild'
/usr/bin/ld: status.cpp:(.text+0x8e5): undefined reference to `xmlNewNode'
/usr/bin/ld: status.cpp:(.text+0x91c): undefined reference to `xmlSetProp'
/usr/bin/ld: status.cpp:(.text+0x927): undefined reference to `xmlAddChild'
/usr/bin/ld: status.cpp:(.text+0x935): undefined reference to `xmlNewNode'
/usr/bin/ld: status.cpp:(.text+0x96c): undefined reference to `xmlSetProp'
/usr/bin/ld: status.cpp:(.text+0x977): undefined reference to `xmlAddChild'
/usr/bin/ld: status.cpp:(.text+0x985): undefined reference to `xmlNewNode'
/usr/bin/ld: status.cpp:(.text+0x9ab): undefined reference to `xmlSetProp'
/usr/bin/ld: status.cpp:(.text+0x9ce): undefined reference to `xmlSetProp'
/usr/bin/ld: status.cpp:(.text+0xa09): undefined reference to `xmlSetProp'
/usr/bin/ld: status.cpp:(.text+0xa3d): undefined reference to `xmlSetProp'
/usr/bin/ld: status.cpp:(.text+0xa48): undefined reference to `xmlAddChild'
/usr/bin/ld: status.cpp:(.text+0xa6d): undefined reference to `xmlNewTextChild'
/usr/bin/ld: status.cpp:(.text+0xa92): undefined reference to `xmlDocDumpMemory'
/usr/bin/ld: status.cpp:(.text+0xb63): undefined reference to `xmlFree'
/usr/bin/ld: status.cpp:(.text+0xb6d): undefined reference to `xmlFreeDoc'
/usr/bin/ld: tools.o: in function `readXMLInteger(_xmlNode*, char const*, int&)':
tools.cpp:(.text+0x35e): undefined reference to `xmlGetProp'
/usr/bin/ld: tools.cpp:(.text+0x382): undefined reference to `xmlFree'
/usr/bin/ld: tools.o: in function `readXMLInteger64(_xmlNode*, char const*, long&)':
tools.cpp:(.text+0x3ae): undefined reference to `xmlGetProp'
/usr/bin/ld: tools.cpp:(.text+0x3d3): undefined reference to `xmlFree'
/usr/bin/ld: tools.o: in function `readXMLFloat(_xmlNode*, char const*, float&)':
tools.cpp:(.text+0x3fe): undefined reference to `xmlGetProp'
/usr/bin/ld: tools.cpp:(.text+0x423): undefined reference to `xmlFree'
/usr/bin/ld: tools.o: in function `utf8ToLatin1(char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
tools.cpp:(.text+0x4d0): undefined reference to `UTF8Toisolat1'
/usr/bin/ld: tools.o: in function `readXMLString(_xmlNode*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
tools.cpp:(.text+0x53f): undefined reference to `xmlGetProp'
/usr/bin/ld: tools.cpp:(.text+0x561): undefined reference to `xmlFree'
/usr/bin/ld: tools.o: in function `readXMLContentString(_xmlNode*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
tools.cpp:(.text+0x5af): undefined reference to `xmlNodeGetContent'
/usr/bin/ld: tools.cpp:(.text+0x5d1): undefined reference to `xmlFree'
/usr/bin/ld: tools.o: in function `getLastXMLError[abi:cxx11]()':
tools.cpp:(.text+0x16b4): undefined reference to `xmlGetLastError'
/usr/bin/ld: tools.o: in function `parseXMLContentString(_xmlNode*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
tools.cpp:(.text+0x2c09): undefined reference to `xmlStrcmp'
/usr/bin/ld: tools.o: in function `parseVocationNode(_xmlNode*, std::map<int, bool, std::less<int>, std::allocator<std::pair<int const, bool> > >&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
tools.cpp:(.text+0x553a): undefined reference to `xmlStrcmp'
/usr/bin/ld: vocation.o: in function `Vocations::parseVocationNode(_xmlNode*)':
vocation.cpp:(.text+0x5f5): undefined reference to `xmlStrcmp'
/usr/bin/ld: vocation.cpp:(.text+0xc19): undefined reference to `xmlStrcmp'
/usr/bin/ld: vocation.cpp:(.text+0xc31): undefined reference to `xmlStrcmp'
/usr/bin/ld: vocation.o:vocation.cpp:(.text+0xe54): more undefined references to `xmlStrcmp' follow
/usr/bin/ld: vocation.o: in function `Vocations::loadFromXml()':
vocation.cpp:(.text+0x1c5e): undefined reference to `xmlParseFile'
/usr/bin/ld: vocation.cpp:(.text+0x1c90): undefined reference to `xmlDocGetRootElement'
/usr/bin/ld: vocation.cpp:(.text+0x1ca3): undefined reference to `xmlStrcmp'
/usr/bin/ld: vocation.cpp:(.text+0x1cd8): undefined reference to `xmlFreeDoc'
/usr/bin/ld: vocation.cpp:(.text+0x1e41): undefined reference to `xmlFreeDoc'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:499: theforgottenserver] Error 1
 
Code:
/home/vejin/forgottenserver-1.0/src/database.cpp: In member function ‘bool Database::connect()’:
/home/vejin/forgottenserver-1.0/src/database.cpp:51:2: error: ‘my_bool’ was not declared in this scope; did you mean ‘bool’?
   51 |  my_bool reconnect = true;
      |  ^~~~~~~
      |  bool
/home/vejin/forgottenserver-1.0/src/database.cpp:52:48: error: ‘reconnect’ was not declared in this scope; did you mean ‘connect’?
   52 |  mysql_options(m_handle, MYSQL_OPT_RECONNECT, &reconnect);
      |                                                ^~~~~~~~~
      |                                                connect
make[2]: *** [CMakeFiles/tfs.dir/build.make:245: CMakeFiles/tfs.dir/src/database.cpp.o] Błąd 1
make[2]: *** Oczekiwanie na niezakończone zadania....
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/tfs.dir/all] Błąd 2
make: *** [Makefile:84: all] Błąd 2
 
Code:
/home/vejin/forgottenserver-1.0/src/database.cpp: In member function ‘bool Database::connect()’:
/home/vejin/forgottenserver-1.0/src/database.cpp:51:2: error: ‘my_bool’ was not declared in this scope; did you mean ‘bool’?
   51 |  my_bool reconnect = true;
      |  ^~~~~~~
      |  bool
/home/vejin/forgottenserver-1.0/src/database.cpp:52:48: error: ‘reconnect’ was not declared in this scope; did you mean ‘connect’?
   52 |  mysql_options(m_handle, MYSQL_OPT_RECONNECT, &reconnect);
      |                                                ^~~~~~~~~
      |                                                connect
make[2]: *** [CMakeFiles/tfs.dir/build.make:245: CMakeFiles/tfs.dir/src/database.cpp.o] Błąd 1
make[2]: *** Oczekiwanie na niezakończone zadania....
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/tfs.dir/all] Błąd 2
make: *** [Makefile:84: all] Błąd 2

If i remember correctly i had a similar error few months ago, it was an issue on my makefile but you could just change my_bool to bool
 
Last edited:
server is compile but weapons not work!!

Lua:
CXX      rsa.o
  CXX      actions.o
  CXX      baseevents.o
  CXX      beds.o
  CXX      chat.o
  CXX      combat.o
  CXX      condition.o
combat.cpp: In static member function ‘static ReturnValue Combat::canDoCombat(const Creature*, const Creature*, bool)’:
combat.cpp:280:19: warning: unused variable ‘targetPlayer’ [-Wunused-variable]
  if(const Player* targetPlayer = target->getPlayer())
                   ^~~~~~~~~~~~
combat.cpp: In static member function ‘static void Combat::combatTileEffects(const SpectatorVec&, Creature*, Tile*, const CombatParams&)’:
combat.cpp:690:9: warning: unused variable ‘pzLock’ [-Wunused-variable]
    bool pzLock = false;
         ^~~~~~
combat.cpp: In member function ‘void Combat::doCombat(Creature*, const Position&) const’:
combat.cpp:881:12: warning: unused variable ‘newMinChange’ [-Wunused-variable]
    int32_t newMinChange = minChange;
            ^~~~~~~~~~~~
combat.cpp:882:12: warning: unused variable ‘newMaxChange’ [-Wunused-variable]
    int32_t newMaxChange = maxChange;
            ^~~~~~~~~~~~
  CXX      configmanager.o
  CXX      connection.o
  CXX      container.o
  CXX      creature.o
  CXX      creatureevent.o
  CXX      cylinder.o
  CXX      database.o
  CXX      databasemanager.o
  CXX      databasemysql.o
  CXX      depot.o
  CXX      dispatcher.o
  CXX      exception.o
  CXX      fileloader.o
  CXX      game.o
game.cpp: In member function ‘bool Game::playerUseItemEx(uint32_t, const Position&, int16_t, uint16_t, const Position&, int16_t, uint16_t, bool)’:
game.cpp:2635:20: warning: unused variable ‘task’ [-Wunused-variable]
     SchedulerTask* task = createSchedulerTask(std::max((int32_t)SCHEDULER_MINTICKS, player->getStepDuration()),
                    ^~~~
game.cpp:2654:18: warning: unused variable ‘task’ [-Wunused-variable]
   SchedulerTask* task = createSchedulerTask(player->getNextActionTime(),
                  ^~~~
game.cpp: In member function ‘bool Game::playerUseItem(uint32_t, const Position&, int16_t, uint8_t, uint16_t, bool)’:
game.cpp:2728:18: warning: unused variable ‘task’ [-Wunused-variable]
   SchedulerTask* task = createSchedulerTask(player->getNextActionTime(),
                  ^~~~
game.cpp: In member function ‘bool Game::combatChangeMana(Creature*, Creature*, int32_t, CombatType_t, bool)’:
game.cpp:4787:24: warning: unused variable ‘list’ [-Wunused-variable]
    const SpectatorVec& list = getSpectators(targetPos);
                        ^~~~
game.cpp: In member function ‘void Game::showHotkeyUseMessage(Player*, Item*)’:
game.cpp:6427:11: warning: unused variable ‘count’ [-Wunused-variable]
  uint32_t count = player->__getItemTypeCount(item->getID(), subType, false);
           ^~~~~
game.cpp: In member function ‘bool Game::playerSpeakToChannel(Player*, MessageClasses, const string&, uint16_t, uint32_t)’:
game.cpp:4121:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
    if(player->hasFlag(PlayerFlag_CanTalkRedChannelAnonymous))
    ^~
game.cpp:4130:3: note: here
   case MSG_GAMEMASTER_CHANNEL:
   ^~~~
game.cpp: In member function ‘bool Game::playerViolationWindow(uint32_t, std::__cxx11::string, uint8_t, ViolationAction_t, std::__cxx11::string, std::__cxx11::string, uint32_t, bool)’:
game.cpp:5340:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
    action = ACTION_BANISHMENT;
    ~~~~~~~^~~~~~~~~~~~~~~~~~~
game.cpp:5343:3: note: here
   case ACTION_BANISHMENT:
   ^~~~
  CXX      globalevent.o
  CXX      group.o
  CXX      gui.o
  CXX      house.o
  CXX      housetile.o
  CXX      inputbox.o
  CXX      ioban.o
  CXX      ioguild.o
  CXX      iologindata.o
  CXX      iomap.o
  CXX      iomapserialize.o
  CXX      item.o
item.cpp: In member function ‘virtual Attr_ReadValue Item::readAttr(AttrTypes_t, PropStream&)’:
item.cpp:657:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
     break;
          ^
item.cpp:660:3: note: here
   default:
   ^~~~~~~
  CXX      itemattributes.o
  CXX      items.o
  CXX      luascript.o
  CXX      mailbox.o
  CXX      map.o
  CXX      monster.o
  CXX      monsters.o
  CXX      movement.o
  CXX      networkmessage.o
  CXX      npc.o
  CXX      otpch.o
  CXX      otserv.o
  CXX      outfit.o
  CXX      outputmessage.o
  CXX      playerbox.o
  CXX      player.o
player.cpp: In member function ‘ItemVector Player::getWeapons() const’:
player.cpp:340:20: warning: enum constant in boolean context [-Wint-in-bool-context]
    if(WEAPON_SHIELD)
                    ^
player.cpp:343:18: warning: enum constant in boolean context [-Wint-in-bool-context]
    if(WEAPON_DIST)
                  ^
player.cpp: In member function ‘virtual void Player::postAddNotification(Creature*, Thing*, const Cylinder*, int32_t, CylinderLink_t)’:
player.cpp:3512:7: warning: variable ‘requireListUpdate’ set but not used [-Wunused-but-set-variable]
  bool requireListUpdate = true;
       ^~~~~~~~~~~~~~~~~
player.cpp: In member function ‘virtual void Player::postRemoveNotification(Creature*, Thing*, const Cylinder*, int32_t, bool, CylinderLink_t)’:
player.cpp:3557:7: warning: variable ‘requireListUpdate’ set but not used [-Wunused-but-set-variable]
  bool requireListUpdate = true;
       ^~~~~~~~~~~~~~~~~
player.cpp: In member function ‘virtual void Player::onTargetGain(Creature*, int32_t)’:
player.cpp:4066:10: warning: variable ‘tmpPlayer’ set but not used [-Wunused-but-set-variable]
  Player* tmpPlayer = NULL;
          ^~~~~~~~~
player.cpp: In member function ‘bool Player::addUnjustifiedKill(const Player*, bool)’:
player.cpp:4514:27: warning: unused variable ‘tc’ [-Wunused-variable]
  uint32_t fc = 0, sc = 0, tc = dateList.size();
                           ^~
  CXX      position.o
  CXX      protocol.o
  CXX      protocolgame.o
  CXX      protocollogin.o
  CXX      raids.o
  CXX      scheduler.o
  CXX      scriptmanager.o
  CXX      server.o
  CXX      spawn.o
  CXX      spells.o
  CXX      status.o
  CXX      talkaction.o
  CXX      teleport.o
  CXX      textlogger.o
  CXX      thing.o
  CXX      tile.o
tile.cpp: In member function ‘virtual ReturnValue Tile::__queryAdd(int32_t, const Thing*, uint32_t, uint32_t, Creature*) const’:
tile.cpp:528:7: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
       if(creature->canWalkthrough(tmp))
       ^~
tile.cpp:530:8: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
        continue;
        ^~~~~~~~
  CXX      tools.o
  CXX      trashholder.o
  CXX      waitlist.o
  CXX      weapons.o
weapons.cpp: In member function ‘virtual bool Weapon::configureEvent(xmlNodePtr)’:
weapons.cpp:222:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  if(readXMLString(p, "enabled", strValue))
  ^~
weapons.cpp:225:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
   if(readXMLInteger(p, "range", intValue)){
   ^~
weapons.cpp: In member function ‘bool Weapons::loadDefaults()’:
weapons.cpp:85:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
      if(it->ammoType != AMMO_NONE)
      ^~
weapons.cpp:88:5: note: here
     case WEAPON_AMMO:
     ^~~~
  CXX      vocation.o
  CXXLD    theotxserver
 
Back
Top