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

Compiling on Ubuntu 12.04 precise, 64bit

Xleniz

New Member
Joined
Jul 6, 2009
Messages
178
Reaction score
3
Location
Sweden
Yo, I want to teach ppl how to compile ubuntu 12.04 64bit, and show that its possible.
Im using: cryingdamson V5 for 8.6.

First, you do:
Code:
apt-get update
apt-get upgrade

Then you do:
Code:
apt-get install autoconf libboost-all-dev libgmp-dev liblua5.1-0 liblua5.1-0-dev liblua50 liblua50-dev liblualib50 liblualib50-dev lua50 lua5.1 libxml2-dev libxml++2.6-dev libmysql++-dev libsqlite0-dev libsqlite3-dev build-essential

In luascript.cpp AND in scriptmanager.cpp:
Find:
Code:
std::string s = it->leaf();

Replace with:
Code:
boost::filesystem::path p = it->path();
std::string s = p.filename().string();

in OTSERV.cpp:

ADD in beginning of file:
Code:
#include <sys/signal.h>
#include <sys/socket.h>

Find:
Code:
std::string getGlobalIP()
{
    WSADATA wsaData;
 
    if(WSAStartup(MAKEWORD(2, 0), &wsaData) != 0)
        return "Not found";
 
    SOCKET s = socket(AF_INET, SOCK_STREAM, 0);
    HOSTENT *host;
    host = gethostbyname("www.whatismyip.com");
    SOCKADDR_IN sin;
    memset(&sin, 0, sizeof sin);
 
    sin.sin_family = AF_INET;
    sin.sin_addr.s_addr = ((struct in_addr*)(host->h_addr))->s_addr;
    sin.sin_port = htons(80);
 
    if(connect(s, (struct sockaddr*)&sin, sizeof(sin)) != SOCKET_ERROR){
        //std::cout << "Connected" << std::endl;
        std::string request = "GET http://www.whatismyip.com/automation/n09230945.asp HTTP/1.1\r\nHost: www.whatismyip.com\r\n\r\n";
        if(send(s, request.c_str(), request.length(), 0) != request.length())
            std::cout << "Error sending request: " << WSAGetLastError() << std::endl;
 
        char buffer[2048];
        std::string response;
        recv(s, (char*)&buffer, 2048, 0);
        response = std::string(buffer);
        int start = int(response.find("\r\n\r\n"));
        int iplength = response.length()-start;
 
        std::string ip = "";
        for(int i = start; i < response.length(); i++){
            if((response.at(i) >= '0' && response.at(i) <= '9') || response.at(i) == '.') ip += response.at(i);
        }
 
		closesocket(s);
 
        return ip;
    }
    else{
        std::cout << "Could not connect: " << WSAGetLastError() << std::endl;
    }
 
    return "127.0.0.1"; 
}

Replace with:
Code:
std::string getGlobalIP() 
{ 
 
    int s = socket(AF_INET, SOCK_STREAM, 0); 
    hostent *host; 
    host = gethostbyname("www.whatismyip.com"); 
    sockaddr_in sin; 
    memset(&sin, 0, sizeof sin); 
 
    sin.sin_family = AF_INET; 
    sin.sin_addr.s_addr = ((struct in_addr*)(host->h_addr))->s_addr; 
    sin.sin_port = htons(80); 
 
    if(connect(s, (struct sockaddr*)&sin, sizeof(sin)) != -1){ 
        //std::cout << "Connected" << std::endl; 
        std::string request = "GET http://www.whatismyip.com/automation/n09230945.asp HTTP/1.1\r\nHost: www.whatismyip.com\r\n\r\n"; 
        if(send(s, request.c_str(), request.length(), 0) != request.length()) 
            std::cout << "Error sending request to www.whatismyip.com" << std::endl; 
 
        char buffer[2048]; 
        std::string response; 
        recv(s, (char*)&buffer, 2048, 0); 
        response = std::string(buffer); 
        int start = int(response.find("\r\n\r\n")); 
        int iplength = response.length()-start; 
 
        std::string ip = ""; 
        for(int i = start; i < response.length(); i++){ 
            if((response.at(i) >= '0' && response.at(i) <= '9') || response.at(i) == '.') ip += response.at(i); 
        } 
 
		shutdown(s, SHUT_RDWR); 
 
        return ip; 
    } 
    else{ 
        std::cout << "Could not connect to www.whatismyip.com" << std::endl; 
    } 
 
    return "127.0.0.1"; 
}

Now, for the shell scripts.
You need to execute these commands:
Code:
sh autogen.sh
./configure --enable-mysql --enable-sqlite --enable-server-diag

And finally, building it.

Default compiling (slowest):
Code:
make
IF your computer has QUAD Core processor (4), do this command:
Code:
make -j 4

If you have DUAL, change 4 to 2.

------------>If you use other OT:
Change make to
Code:
sh build.sh

------------>If you get lots of warnings threated as errors in other OT:
Remove -wError
in all makefiles (Makefile, Makefile.in, Makefile.am)

------------>IF you get rsa.o errors (that it doesnt exist):
Remove rsa.o in all makefiles.

Thats all, Ty for reading.
 
Last edited:
i use tfs 0.4 rev. 3777 not works...
mate, all of your shit are too vague to know what the fuck is going on, so i kindly ask you, please tell us what are you having or get the fuck out of this forum, thanks.
 
mate, all of your shit are too vague to know what the fuck is going on, so i kindly ask you, please tell us what are you having or get the fuck out of this forum, thanks.
its useless, I still did not post my mistake because I had to leave, and you only here that this flood?
 
Compiles fine on Ubuntu 12.04, aldoh, it have problems when running.
Code:
 >> Loading items
>> Loading groups
>> Loading vocations
>> Loading script systems
[Error - LuaScriptInterface::loadFile] cannot open data/lib/data/lib/000-constant.lua: No such file or directory
[Warning - LuaScriptInterface::initState] Cannot load data/lib/
[Error - LuaScriptInterface::loadFile] cannot open data/weapons/lib/data/weapons/lib/weapons.lua: No such file or directory
[Warning - BaseEvents::loadFromXml] Cannot load weapons/lib/

[Error - Weapon Interface] 
data/weapons/scripts/poison_arrow.lua
Description: 
(luaCreateConditionObject) Condition not found

[Error - Weapon Interface] 
data/weapons/scripts/poison_arrow.lua
Description: 
(luaSetConditionParam) Condition not found

[Error - Weapon Interface] 
data/weapons/scripts/poison_arrow.lua
Description: 
(luaAddDamageCondition) Condition not found

[Error - Weapon Interface] 
data/weapons/scripts/poison_arrow.lua
Description: 
(luaSetCombatCondition) Condition not found

[Error - Weapon Interface] 
data/weapons/scripts/viper_star.lua
Description: 
(luaCreateConditionObject) Condition not found

[Error - Weapon Interface] 
data/weapons/scripts/viper_star.lua
Description: 
(luaSetConditionParam) Condition not found

[Error - Weapon Interface] 
data/weapons/scripts/viper_star.lua
Description: 
(luaAddDamageCondition) Condition not found

[Error - Weapon Interface] 
data/weapons/scripts/viper_star.lua
Description: 
(luaAddDamageCondition) Condition not found

[Error - Weapon Interface] 
data/weapons/scripts/viper_star.lua
Description: 
(luaSetCombatCondition) Condition not found
[Error - LuaScriptInterface::loadFile] cannot open data/lib/data/lib/000-constant.lua: No such file or directory
[Warning - LuaScriptInterface::initState] Cannot load data/lib/
[Error - LuaScriptInterface::loadFile] cannot open data/spells/lib/data/spells/lib/spells.lua: No such file or directory
[Warning - BaseEvents::loadFromXml] Cannot load spells/lib/

[Error - Spell Interface] 
data/spells/scripts/attack/poison bomb.lua
Description: 
(luaSetCombatArea) Area not found
Segmentation fault (core dumped)
Everything is pretty much unmodified. Using the default datapack that comes with the download. I'm not sure what's wrong, but as seen here:
Code:
[[B]Error - LuaScriptInterface::loadFile] cannot open data/lib/data/lib/000-constant.lua: No such file or directory[/B]
it seems that the paths are somewhat screwed up, i mean, "data/lib/data/lib"? Isint it supposed to be just data/lib? Do I have to change this in the source?
Thanks for a nice guide!
 
Compiles fine on Ubuntu 12.04, aldoh, it have problems when running.
Code:
 >> Loading items
>> Loading groups
>> Loading vocations
>> Loading script systems
[Error - LuaScriptInterface::loadFile] cannot open data/lib/data/lib/000-constant.lua: No such file or directory
[Warning - LuaScriptInterface::initState] Cannot load data/lib/
[Error - LuaScriptInterface::loadFile] cannot open data/weapons/lib/data/weapons/lib/weapons.lua: No such file or directory
[Warning - BaseEvents::loadFromXml] Cannot load weapons/lib/

[Error - Weapon Interface] 
data/weapons/scripts/poison_arrow.lua
Description: 
(luaCreateConditionObject) Condition not found

[Error - Weapon Interface] 
data/weapons/scripts/poison_arrow.lua
Description: 
(luaSetConditionParam) Condition not found

[Error - Weapon Interface] 
data/weapons/scripts/poison_arrow.lua
Description: 
(luaAddDamageCondition) Condition not found

[Error - Weapon Interface] 
data/weapons/scripts/poison_arrow.lua
Description: 
(luaSetCombatCondition) Condition not found

[Error - Weapon Interface] 
data/weapons/scripts/viper_star.lua
Description: 
(luaCreateConditionObject) Condition not found

[Error - Weapon Interface] 
data/weapons/scripts/viper_star.lua
Description: 
(luaSetConditionParam) Condition not found

[Error - Weapon Interface] 
data/weapons/scripts/viper_star.lua
Description: 
(luaAddDamageCondition) Condition not found

[Error - Weapon Interface] 
data/weapons/scripts/viper_star.lua
Description: 
(luaAddDamageCondition) Condition not found

[Error - Weapon Interface] 
data/weapons/scripts/viper_star.lua
Description: 
(luaSetCombatCondition) Condition not found
[Error - LuaScriptInterface::loadFile] cannot open data/lib/data/lib/000-constant.lua: No such file or directory
[Warning - LuaScriptInterface::initState] Cannot load data/lib/
[Error - LuaScriptInterface::loadFile] cannot open data/spells/lib/data/spells/lib/spells.lua: No such file or directory
[Warning - BaseEvents::loadFromXml] Cannot load spells/lib/

[Error - Spell Interface] 
data/spells/scripts/attack/poison bomb.lua
Description: 
(luaSetCombatArea) Area not found
Segmentation fault (core dumped)
Everything is pretty much unmodified. Using the default datapack that comes with the download. I'm not sure what's wrong, but as seen here:
Code:
[[B]Error - LuaScriptInterface::loadFile] cannot open data/lib/data/lib/000-constant.lua: No such file or directory[/B]
it seems that the paths are somewhat screwed up, i mean, "data/lib/data/lib"? Isint it supposed to be just data/lib? Do I have to change this in the source?
Thanks for a nice guide!

Thanks,
Srry, Lol :{ I fixed it before, give me some min..
 
Ty XD

@tony32
Fixed, change
Code:
std::string s = p.string();

To:
Code:
std::string s = p.filename().string();
 
my error
[CPP]
root@ubuntu:/tfs3777# sh build.sh
TheForgottenServer build script- seems to speed things up ALOT.
CCache: OK
CCache binaries located in /usr/lib/ccache
Building on 2 cores, using 3 processes
make all-am
make[1]: Entrando no diretório `/tfs3777'
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT luascript.o -MD -MP -MF .deps/luascript.Tpo -c -o luascript.o luascript.cpp
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT protocolhttp.o -MD -MP -MF .deps/protocolhttp.Tpo -c -o protocolhttp.o protocolhttp.cpp
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT protocollogin.o -MD -MP -MF .deps/protocollogin.Tpo -c -o protocollogin.o protocollogin.cpp
mv -f .deps/protocolhttp.Tpo .deps/protocolhttp.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT protocolold.o -MD -MP -MF .deps/protocolold.Tpo -c -o protocolold.o protocolold.cpp
mv -f .deps/protocollogin.Tpo .deps/protocollogin.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT quests.o -MD -MP -MF .deps/quests.Tpo -c -o quests.o quests.cpp
mv -f .deps/protocolold.Tpo .deps/protocolold.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT raids.o -MD -MP -MF .deps/raids.Tpo -c -o raids.o raids.cpp
mv -f .deps/quests.Tpo .deps/quests.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT rsa.o -MD -MP -MF .deps/rsa.Tpo -c -o rsa.o rsa.cpp
luascript.cpp: Em função membro estática ‘static int32_t LuaInterface::luaGetTownTemplePosition(lua_State*)’:
luascript.cpp:9187:7: aviso: variable ‘displayError’ set but not used [-Wunused-but-set-variable]
mv -f .deps/luascript.Tpo .deps/luascript.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT scheduler.o -MD -MP -MF .deps/scheduler.Tpo -c -o scheduler.o scheduler.cpp
mv -f .deps/rsa.Tpo .deps/rsa.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT scriptmanager.o -MD -MP -MF .deps/scriptmanager.Tpo -c -o scriptmanager.o scriptmanager.cpp
mv -f .deps/raids.Tpo .deps/raids.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT server.o -MD -MP -MF .deps/server.Tpo -c -o server.o server.cpp
mv -f .deps/scheduler.Tpo .deps/scheduler.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT spawn.o -MD -MP -MF .deps/spawn.Tpo -c -o spawn.o spawn.cpp
mv -f .deps/scriptmanager.Tpo .deps/scriptmanager.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT spells.o -MD -MP -MF .deps/spells.Tpo -c -o spells.o spells.cpp
mv -f .deps/server.Tpo .deps/server.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT status.o -MD -MP -MF .deps/status.Tpo -c -o status.o status.cpp
mv -f .deps/spawn.Tpo .deps/spawn.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT talkaction.o -MD -MP -MF .deps/talkaction.Tpo -c -o talkaction.o talkaction.cpp
mv -f .deps/spells.Tpo .deps/spells.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT teleport.o -MD -MP -MF .deps/teleport.Tpo -c -o teleport.o teleport.cpp
mv -f .deps/status.Tpo .deps/status.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT textlogger.o -MD -MP -MF .deps/textlogger.Tpo -c -o textlogger.o textlogger.cpp
mv -f .deps/talkaction.Tpo .deps/talkaction.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT thing.o -MD -MP -MF .deps/thing.Tpo -c -o thing.o thing.cpp
mv -f .deps/teleport.Tpo .deps/teleport.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT tile.o -MD -MP -MF .deps/tile.Tpo -c -o tile.o tile.cpp
mv -f .deps/textlogger.Tpo .deps/textlogger.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT tools.o -MD -MP -MF .deps/tools.Tpo -c -o tools.o tools.cpp
mv -f .deps/thing.Tpo .deps/thing.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT trashholder.o -MD -MP -MF .deps/trashholder.Tpo -c -o trashholder.o trashholder.cpp
mv -f .deps/tools.Tpo .deps/tools.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT waitlist.o -MD -MP -MF .deps/waitlist.Tpo -c -o waitlist.o waitlist.cpp
mv -f .deps/tile.Tpo .deps/tile.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT weapons.o -MD -MP -MF .deps/weapons.Tpo -c -o weapons.o weapons.cpp
mv -f .deps/trashholder.Tpo .deps/trashholder.Po
g++ -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -pipe -MT vocation.o -MD -MP -MF .deps/vocation.Tpo -c -o vocation.o vocation.cpp
mv -f .deps/waitlist.Tpo .deps/waitlist.Po
mv -f .deps/vocation.Tpo .deps/vocation.Po
mv -f .deps/weapons.Tpo .deps/weapons.Po
g++ -I/usr/local/include/libxml2 -I/usr/include/lua5.1 -O2 -fomit-frame-pointer -D__USE_MYSQL__ -D__WAR_SYSTEM__ -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Wno-strict-aliasing -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 -lcryptopp -lboost_filesystem-mt -lboost_date_time-mt -lboost_system-mt -lboost_regex-mt -lboost_thread-mt -lz -lgmp -L/usr/local/lib -lxml2 -lz -lm
game.o: In function `Game::playerViolationWindow(unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned char, ViolationAction_t, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, bool)':
game.cpp:(.text+0x118d4): undefined reference to `explodeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
game.cpp:(.text+0x11a02): undefined reference to `explodeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
game.o: In function `Game::setGameState(GameState_t)':
game.cpp:(.text+0x17c94): undefined reference to `Player::kick(bool, bool)'
game.cpp:(.text+0x17def): undefined reference to `Player::kick(bool, bool)'
game.o: In function `Game::kickPlayer(unsigned int, bool)':
game.cpp:(.text+0x7ba): undefined reference to `Player::kick(bool, bool)'
globalevent.o: In function `GlobalEvent::configureEvent(_xmlNode*)':
globalevent.cpp:(.text+0x498): undefined reference to `explodeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
ioban.o: In function `IOBan::addIpBanishment(unsigned int, long long, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, unsigned int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >) const':
ioban.cpp:(.text+0x3f3e): undefined reference to `Player::kick(bool, bool)'
movement.o: In function `MoveEvents::registerEvent(Event*, _xmlNode*, bool)':
movement.cpp:(.text+0x5045): undefined reference to `explodeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
movement.cpp:(.text+0x50f8): undefined reference to `explodeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
movement.cpp:(.text+0x5273): undefined reference to `explodeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
movement.cpp:(.text+0x5330): undefined reference to `explodeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
movement.cpp:(.text+0x5495): undefined reference to `explodeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
movement.o:movement.cpp:(.text+0x5550): more undefined references to `explodeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)' follow
otserv.o: In function `Service<ProtocolManager>::makeProtocol(boost::shared_ptr<Connection>) const':
otserv.cpp:(.text._ZNK7ServiceI15ProtocolManagerE12makeProtocolEN5boost10shared_ptrI10ConnectionEE[Service<ProtocolManager>::makeProtocol(boost::shared_ptr<Connection>) const]+0x10a): undefined reference to `ProtocolManager::protocolManagerCount'
player.o: In function `Player::eek:nKilledCreature(Creature*, DeathEntry&)':
player.cpp:(.text+0x16c39): undefined reference to `IOGuild::war(War_t&)'
player.o:(.rodata._ZTC6Player0_8Creature[vtable for Player]+0x178): undefined reference to `Creature::setNormalCreatureLight()'
player.o:(.rodata._ZTV6Player[vtable for Player]+0x178): undefined reference to `Creature::setNormalCreatureLight()'
actions.o: In function `Actions::registerEvent(Event*, _xmlNode*, bool)':
actions.cpp:(.text+0x2ab1): undefined reference to `explodeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
actions.cpp:(.text+0x2b20): undefined reference to `explodeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
actions.cpp:(.text+0x334b): undefined reference to `explodeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
actions.cpp:(.text+0x33ba): undefined reference to `explodeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
actions.cpp:(.text+0x386c): undefined reference to `explodeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
actions.o:actions.cpp:(.text+0x38d8): more undefined references to `explodeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)' follow
baseevents.o: In function `BaseEvents::loadFromXml()':
baseevents.cpp:(.text+0x107f): undefined reference to `LuaInterface::loadDirectory(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Npc*, bool)'
chat.o: In function `Chat::talkToChannel(Player*, SpeakClasses, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned short)':
chat.cpp:(.text+0x2a43): undefined reference to `explodeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
chat.cpp:(.text+0x362c): undefined reference to `explodeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
item.o: In function `Item::loadItem(_xmlNode*, Container*)':
item.cpp:(.text+0x2390): undefined reference to `explodeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
item.cpp:(.text+0x23ec): undefined reference to `explodeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
items.o: In function `Items::loadFromXml()':
items.cpp:(.text+0x55d3): undefined reference to `explodeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
items.o:items.cpp:(.text+0x568a): more undefined references to `explodeString(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)' follow
talkaction.o: In function `TalkAction::diagnostics(Creature*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
talkaction.cpp:(.text+0x5cdb): undefined reference to `Npc::npcCount'
talkaction.cpp:(.text+0x5fb3): undefined reference to `ProtocolManager::protocolManagerCount'
talkaction.cpp:(.text+0x629a): undefined reference to `OutputMessagePool::eek:utputMessagePoolCount'
talkaction.cpp:(.text+0x62a0): undefined reference to `Connection::connectionCount'
collect2: ld returned 1 exit status
make[1]: ** [theforgottenserver] Erro 1
make[1]: Saindo do diretório `/tfs3777'
make: ** [all] Erro 2
[/CPP]
 
rev 3777

in otserv.cpp

u said to find

std::string getGlobalIP()
{

int s = socket(AF_INET, SOCK_STREAM, 0);
hostent *host;
host = gethostbyname("www.whatismyip.com");
sockaddr_in sin;
memset(&sin, 0, sizeof sin);

sin.sin_family = AF ......



but it doesnt exist in otserv.cpp how may i 'll replace a code that doesnt exist ? lol
 
BumP

Same Error


@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
 
Back
Top