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

Solved The Newest Avesta Compilation

Erevius

It Was A Good Day
Joined
Feb 12, 2010
Messages
157
Reaction score
7
Location
Poland/Olsztyn
Hello! I'd like to compile avesta (Avesta.7z - avesta74 - Avesta (9 april 2012) - A modified Open Tibia Server for the old tibia 7.4 - Google Project Hosting) with The Forgotten Dev-Cpp v2.2 but I'm getting errors.

C++ Compiler
Code:
-D__USE_MYSQL__
-D__SKULL_SYSTEM__
-D__PB_GMINVISIBLE__
-D__ENABLE_SERVER_DIAGNOSTIC__

Linker
Code:
-lboost_regex
-lboost_system
-lboost_thread
-lws2_32
-llua5.1
-lmysql
-llibxml2
-lwsock32

Error Log:
Code:
Compiler: Default compiler
Building Makefile: "D:\Gry\OTS\Erevia World 7.6\Source\compiler\Makefile.win"
Executing  make...
mingw32-make -f "D:\Gry\OTS\Erevia World 7.6\Source\compiler\Makefile.win" all
g++.exe -c ../actions.cpp -o ../actions.o -I"include"  -D__USE_MYSQL__ -D__SKULL_SYSTEM__ -D__PB_GMINVISIBLE__ -D__ENABLE_SERVER_DIAGNOSTIC__  

In file included from ../player.h:24,
                 from ../actions.cpp:23:
../otsystem.h:56:24: sys/socket.h: No such file or directory
../otsystem.h:57:24: netinet/in.h: No such file or directory
../otsystem.h:58:23: arpa/inet.h: No such file or directory
../otsystem.h:59:19: netdb.h: No such file or directory

mingw32-make: *** [../actions.o] Error 1

Execution terminated

btw. I'd like also to use "Protocol: 7.6 (after recompilation with __76__ definition)".
 
Last edited:
:S Now, thissss:
Code:
Compiler: Default compiler
Building Makefile: "D:\Gry\OTS\Erevia World 7.6\Source\compiler\Makefile.win"
Executing  make...
mingw32-make -f "D:\Gry\OTS\Erevia World 7.6\Source\compiler\Makefile.win" all
g++.exe -c ../ban.cpp -o obj/ban.o -I"include"  -I"D:/Gry/OTS/The Forgotten Dev-Cpp/include"  -D__WINDOWS__ -D__USE_MYSQL__ -D__SKULL_SYSTEM__ -D__PB_GMINVISIBLE__ -D__ENABLE_SERVER_DIAGNOSTIC__  

g++.exe -c ../combat.cpp -o obj/combat.o -I"include"  -I"D:/Gry/OTS/The Forgotten Dev-Cpp/include"  -D__WINDOWS__ -D__USE_MYSQL__ -D__SKULL_SYSTEM__ -D__PB_GMINVISIBLE__ -D__ENABLE_SERVER_DIAGNOSTIC__  

In file included from D:/Gry/OTS/The Forgotten Dev-Cpp/include/mysql/mysql.h:72,
                 from ../databasemysql.h:31,

                 from ../database.h:289,
                 from ../iomapserialize.h:28,
                 from ../map.h:34,
                 from ../combat.h:26,
                 from ../combat.cpp:22:
D:/Gry/OTS/The Forgotten Dev-Cpp/include/mysql/mysql_com.h:183: error: `SOCKET' does not name a type
D:/Gry/OTS/The Forgotten Dev-Cpp/include/mysql/mysql_com.h:358: error: `SOCKET' was not declared in this scope
D:/Gry/OTS/The Forgotten Dev-Cpp/include/mysql/mysql_com.h:358: error: expected primary-expression before "const"
D:/Gry/OTS/The Forgotten Dev-Cpp/include/mysql/mysql_com.h:358: error: expected primary-expression before "unsigned"
D:/Gry/OTS/The Forgotten Dev-Cpp/include/mysql/mysql_com.h:359: error: expected primary-expression before "unsigned"
D:/Gry/OTS/The Forgotten Dev-Cpp/include/mysql/mysql_com.h:359: error: initializer expression list treated as compound expression

../combat.cpp: In static member function `static void Combat::getCombatArea(const Position&, const Position&, const AreaCombat*, std::list<Tile*, std::allocator<Tile*> >&)':
../combat.cpp:144: warning: comparison is always true due to limited range of data type
../combat.cpp:144: warning: comparison is always true due to limited range of data type
../combat.cpp:144: warning: comparison is always true due to limited range of data type
../combat.cpp:145: warning: comparison is always true due to limited range of data type
../combat.cpp:145: warning: comparison is always true due to limited range of data type

../combat.cpp: In member function `bool AreaCombat::getList(const Position&, const Position&, std::list<Tile*, std::allocator<Tile*> >&) const':
../combat.cpp:1139: warning: comparison is always true due to limited range of data type
../combat.cpp:1139: warning: comparison is always true due to limited range of data type
../combat.cpp:1139: warning: comparison is always true due to limited range of data type

../combat.cpp:1140: warning: comparison is always true due to limited range of data type
../combat.cpp:1140: warning: comparison is always true due to limited range of data type

mingw32-make: *** [obj/combat.o] Error 1

Execution terminated
 
The warnings can be ignored, here is my setup:

Code:
-D__USE_MYSQL__
-D__SKULL_SYSTEM__
-D__XID_EXPERIENCE_STAGES__
-D__WINDOWS__

Code:
-march
-s
-Os
-lboost_regex
-lboost_system
-lboost_thread
-lws2_32
-llua5.1
-lmysql
-llibxml2
-lwsock32
-lgmp

Hopefully this will help.
 
__SKULL_SYSTEM__ is already defined in source code, you don't need to do it again in options
__XID_EXPERIENCE_STAGES__ is no longer there, use creatureevents instead
__PB_GMINVISIBLE__ is removed, caused debugs
__ENABLE_SERVER_DIAGNOSTIC__ is rather useless for you

what you need to define is database driver
__USE_MYSQL__ or __USE_SQLITE__

what you can also define is
__EXCEPTION_TRACER__ (in case server crashes), on msvc you define __USE_MINIDUMP__
__76__ (if you want to use 7.6 protocol), (by the way, in definitions.h you need to change OTSERV_CLIENT_VERSION)

so in MinGW, C++ Compiler could look like:
Code:
D__WINDOWS__
D__USE_MYSQL__
D__76__
 
I just haven't put the "-D" before "__76__" so I though I had to do something in definitions.h ...
Btw, off topic?

Thread to close.
 
Last edited:

Similar threads

Replies
2
Views
592
Back
Top