Jump to content

How To Install Current Extern Libraries and Include


Recommended Posts

Hello everybody! Me again. I will share with you the current library here. So, let's do this.

for Server (Don't forget to get backup!)

before anything else(if required)

portsnap fetch extract

#1: 

If you installed mysql:

if(mysql)

Spoiler

Open with Notepad++ etc.: libsql/Makefile

Search:

IFLAGS = -I../libmysql/7.x-5.1.35 or(it is up to you) IFLAGS = -I../libmysql/5.x-5.1.35

Replace:

IFLAGS = -I/usr/local/include/mysql

Like thisCLICK

else

Spoiler

cd /usr/ports/databases/mysql55-server && make install clean

If required:

cd /usr/ports/databases/mysql55-client && make install clean

#2:

Spoiler

Respectively:

cd /usr/ports/devel/boost-libs && make install clean

cd /usr/ports/security/cryptopp && make install clean

cd /usr/ports/devel/googletest && make install clean

If you want more:

cd /usr/ports/graphics/devil/ && make install clean

after

Spoiler

Open with Notepad++ etc.: db/src/Makefile

Search:

# boost
INCDIR += -I../../../Extern/include

Replace:

# boost
INCDIR += -I/usr/local/include

 

Search:

INCDIR += -I../../libmysql/7.x-5.1.35
LIBDIR += -L../../libmysql/7.x-5.1.35

or(it is up to you)

INCDIR += -I../../libmysql/5.x-5.1.35
LIBDIR += -L../../libmysql/5.x-5.1.35

Replace:
INCDIR += -I/usr/local/include/mysql
LIBDIR += -L/usr/local/lib/mysql

Like thisCLICK

and

Spoiler

Open with Notepad++ etc.: game/src/Makefile

Search:

# boost
INCDIR += -I../../../Extern/include/boost

Replace:

# boost
INCDIR += -I/usr/local/include/boost

Search:

INCDIR += -I../../libmysql/7.x-5.1.35
LIBDIR += -L../../libmysql/7.x-5.1.35

or(it is up to you)

INCDIR += -I../../libmysql/5.x-5.1.35
LIBDIR += -L../../libmysql/5.x-5.1.35

Replace:

INCDIR += -I/usr/local/include/mysql
LIBDIR += -lmysqlclient -L/usr/local/lib/mysql -lz

Like thisCLICK

 

Delete:

INCDIR += -I../../../Extern/include
LIBDIR += -L../../../Extern/lib
LIBS += -lcryptopp -lgtest

Search:

# Project Library

Search:

LIBS += -lthecore -lpoly -llua -llualib -lsql -lgame

Add:

-lcryptopp -lgtest

Like this: LIBS += -lthecore -lpoly -llua -llualib -lsql -lgame -lcryptopp -lgtest

for Client

soon

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 4
  • Dislove 1
  • Good 2
  • Love 1
  • Love 5
Link to comment
Share on other sites

  • 4 weeks later...

With new boos you may have problems, because of "boost::unordered_map<VID, size_t>::iterator iterTargetMap = rSkillUseInfo.TargetVIDMap.find(TargetVID);" in char_skill.cpp

Fix for boost:

Spoiler

 

In char_skill.cpp:

1) Find "boost::unordered_map<VID, size_t>::iterator iterTargetMap = rSkillUseInfo.TargetVIDMap.find(TargetVID);" replace with "boost::unordered_map<DWORD, size_t>::iterator iterTargetMap = rSkillUseInfo.TargetVIDMap.find((DWORD)TargetVID);"

2) Find "rSkillUseInfo.TargetVIDMap.insert( std::make_pair(TargetVID, 1) );" replace with "rSkillUseInfo.TargetVIDMap.insert( std::make_pair((DWORD)TargetVID, 1) );"

In char.h:

Find "boost::unordered_map<VID, size_t> TargetVIDMap;" replace with "boost::unordered_map<DWORD, size_t> TargetVIDMap;"

 

 

And if you want to compile game and/or db with '-static' flag (with this you'll not need any libs on x64 operating systems), you have to change default setup config for devil. Also you'll need to include additional libs in game/src/Makefile 

Check spoiler ;)

Spoiler

yqTGqhK.png

n1wvzzS.png

 

Regards.

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

38 minutes ago, wezt said:

With new boos you may have problems, because of "boost::unordered_map<VID, size_t>::iterator iterTargetMap = rSkillUseInfo.TargetVIDMap.find(TargetVID);" in char_skill.cpp

Fix for boost:

  Reveal hidden contents

 

In char_skill.cpp:

1) Find "boost::unordered_map<VID, size_t>::iterator iterTargetMap = rSkillUseInfo.TargetVIDMap.find(TargetVID);" replace with "boost::unordered_map<DWORD, size_t>::iterator iterTargetMap = rSkillUseInfo.TargetVIDMap.find((DWORD)TargetVID);"

2) Find "rSkillUseInfo.TargetVIDMap.insert( std::make_pair(TargetVID, 1) );" replace with "rSkillUseInfo.TargetVIDMap.insert( std::make_pair((DWORD)TargetVID, 1) );"

In char.h:

Find "boost::unordered_map<VID, size_t> TargetVIDMap;" replace with "boost::unordered_map<DWORD, size_t> TargetVIDMap;"

 

 

And if you want to compile game and/or with '-static' flag (with this you'll not need any libs on x64 operating systems), you have to change default setup config for devil. Also you'll need to include additional libs in game/src/Makefile 

Check spoiler ;)

  Reveal hidden contents

yqTGqhK.png

n1wvzzS.png

 

Regards.

You can replace iterators with auto.. this solved problem for me

 

auto iterTargetMap = rSkillUseInfo.TargetVIDMap.find(TargetVID);
Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 3 weeks later...
  • Premium
On 2016. 04. 03. at 5:08 PM, ds_aim said:

You can replace iterators with auto.. this solved problem for me

 


auto iterTargetMap = rSkillUseInfo.TargetVIDMap.find(TargetVID);

boost::unordered_map<const VID, size_t>::iterator iterTargetMap = rSkillUseInfo.TargetVIDMap.find(TargetVID);

replace to?

auto iterTargetMap = rSkillUseInfo.TargetVIDMap.find(TargetVID);

that enough?

 

c++latest, latest libs...

Link to comment
Share on other sites

2 minutes ago, flatik said:

boost::unordered_map<const VID, size_t>::iterator iterTargetMap = rSkillUseInfo.TargetVIDMap.find(TargetVID);

replace to?

auto iterTargetMap = rSkillUseInfo.TargetVIDMap.find(TargetVID);

that enough?

 

yeah, but auto is an c++11 feature.

You need to add -std=c++11 flag intro makefile

 

http://en.cppreference.com/w/cpp/language/auto

  • Love 1
Link to comment
Share on other sites

  • Premium

Not work! ő.Ő

My version: G++5, boost 1.5.8, lua51, libdevil 1.7.8, freebsd 10.3

Edit:

replace typeof with __typeof

replace auto_ptr with unique_ptr

 

Makefile:

LIBS = -pthread -lm -lmd
CFLAGS = -g -Wall -Ofast -std=c++11 -pipe -mtune=athlon-fx -fstack-protector-all -m64 -fexceptions -D_THREAD_SAFE -DNDEBUG -Wno-strict-aliasing

what the problem? :(

c++latest, latest libs...

Link to comment
Share on other sites

8 minutes ago, flatik said:

Not work! ő.Ő

My version: G++5, boost 1.5.8, lua51, libdevil 1.7.8, freebsd 10.3

Edit:

replace typeof with __typeof

replace auto_ptr with unique_ptr

what the problem? :(

Char.h

Find:     boost::unordered_map<VID, size_t> TargetVIDMap;

replace with

boost::unordered_map<DWORD, size_t> TargetVIDMap;

 

Char_skill.cpp

auto iterTargetMap = rSkillUseInfo.TargetVIDMap.find(TargetVID);

  • Love 1
Link to comment
Share on other sites

  • 5 months later...

Help:

Spoiler

				
			gmake -C game/src
		gmake[1]: Entering directory '/root/workspace/Server/game/src'
		 [OK]         Compiling: BattleArena.cpp
		In file included from stdafx.h:39,
		                 from BattleArena.cpp:1:
		event.h:10:35: error: boost/intrusive_ptr.hpp: No such file or directory
		In file included from BattleArena.cpp:6:
		char.h:4:35: error: boost/unordered_map.hpp: No such file or directory
		In file included from stdafx.h:39,
		                 from BattleArena.cpp:1:
		event.h:37: error: 'boost' has not been declared
		event.h:37: error: expected initializer before '<' token
		event.h:38: error: typedef 'TEVENTFUNC' is initialized (use __typeof__ instead)
		event.h:38: error: 'LPEVENT' was not declared in this scope
		event.h:38: error: expected primary-expression before 'long'
		event.h:57: error: 'TEVENTFUNC' does not name a type
		event.h: In constructor 'event::event()':
		event.h:47: error: class 'event' does not have any field named 'func'
		event.h: At global scope:
		event.h:83: error: 'LPEVENT' does not name a type
		event.h:84: error: variable or field 'event_cancel' declared void
		event.h:84: error: 'LPEVENT' was not declared in this scope
		event.h:84: error: expected primary-expression before ')' token
		event.h:85: error: 'LPEVENT' was not declared in this scope
		event.h:86: error: 'LPEVENT' was not declared in this scope
		event.h:87: error: variable or field 'event_reset_time' declared void
		event.h:87: error: 'LPEVENT' was not declared in this scope
		event.h:87: error: expected primary-expression before 'long'
		event.h:91: error: 'LPEVENT' was not declared in this scope
		In file included from BattleArena.cpp:3:
		BattleArena.h:21: error: 'LPEVENT' does not name a type
		In file included from char.h:9,
		                 from BattleArena.cpp:6:
		horse_rider.h:88: error: 'LPEVENT' does not name a type
		horse_rider.h:89: error: 'LPEVENT' does not name a type
		horse_rider.h:91: error: 'LPEVENT' has not been declared
		horse_rider.h:92: error: 'LPEVENT' has not been declared
		In file included from char.h:15,
		                 from BattleArena.cpp:6:
		mining.h:6: error: 'LPEVENT' does not name a type
		In file included from BattleArena.cpp:6:
		char.h:458: error: 'boost' has not been declared
		char.h:458: error: ISO C++ forbids declaration of 'unordered_map' with no type
		char.h:458: error: expected ';' before '<' token
		char.h:960: error: 'LPEVENT' has not been declared
		char.h:1008: error: 'LPEVENT' does not name a type
		char.h:1017: error: 'LPEVENT' was not declared in this scope
		char.h:1017: error: template argument 2 is invalid
		char.h:1017: error: template argument 4 is invalid
		char.h:1423: error: 'LPEVENT' does not name a type
		char.h:1452: error: 'boost' has not been declared
		char.h:1452: error: ISO C++ forbids declaration of 'unordered_map' with no type
		char.h:1452: error: expected ';' before '<' token
		char.h:1703: error: 'LPEVENT' does not name a type
		char.h:1704: error: 'LPEVENT' does not name a type
		char.h:1705: error: 'LPEVENT' does not name a type
		char.h:1706: error: 'LPEVENT' does not name a type
		char.h:1707: error: 'LPEVENT' does not name a type
		char.h:1708: error: 'LPEVENT' does not name a type
		char.h:1709: error: 'LPEVENT' does not name a type
		char.h:1710: error: 'LPEVENT' does not name a type
		char.h:1711: error: 'LPEVENT' does not name a type
		char.h:1712: error: 'LPEVENT' does not name a type
		char.h:1717: error: 'LPEVENT' does not name a type
		char.h:1719: error: 'LPEVENT' does not name a type
		char.h:1720: error: 'LPEVENT' does not name a type
		char.h:1721: error: 'LPEVENT' does not name a type
		char.h:1722: error: 'LPEVENT' does not name a type
		char.h:1731: error: 'LPEVENT' was not declared in this scope
		char.h:1731: error: template argument 2 is invalid
		char.h:1731: error: template argument 4 is invalid
		char.h:1949: error: 'LPEVENT' does not name a type
		char.h: In member function 'void CHARACTER::SetPartyRequestEvent(int)':
		char.h:960: error: 'm_pkPartyRequestEvent' was not declared in this scope
		char.h: In member function 'bool CHARACTER::IsWarping() const':
		char.h:1724: error: 'm_pkWarpEvent' was not declared in this scope
		In file included from sectree_manager.h:4,
		                 from BattleArena.cpp:7:
		sectree.h: At global scope:
		sectree.h:166: error: 'LPEVENT' has not been declared
		In file included from regen.h:1,
		                 from BattleArena.cpp:8:
		dungeon.h:154: error: 'LPEVENT' does not name a type
		dungeon.h:156: error: 'LPEVENT' does not name a type
		dungeon.h:157: error: 'LPEVENT' does not name a type
		dungeon.h:161: error: 'LPEVENT' has not been declared
		dungeon.h:163: error: 'LPEVENT' has not been declared
		dungeon.h:164: error: 'LPEVENT' has not been declared
		In file included from BattleArena.cpp:8:
		regen.h:31: error: 'LPEVENT' does not name a type
		regen.h: In constructor 'regen::regen()':
		regen.h:47: error: type 'event' is not a direct base of 'regen'
		In file included from questnpc.h:4,
		                 from questmanager.h:6,
		                 from BattleArena.cpp:9:
		questpc.h: At global scope:
		questpc.h:107: error: 'LPEVENT' has not been declared
		questpc.h:175: error: 'LPEVENT' was not declared in this scope
		questpc.h:175: error: template argument 2 is invalid
		questpc.h:175: error: template argument 4 is invalid
		In file included from BattleArena.cpp:9:
		questmanager.h:71: error: 'LPEVENT' has not been declared
		questmanager.h:183: error: 'LPEVENT' was not declared in this scope
		questmanager.h:183: error: template argument 2 is invalid
		questmanager.h:183: error: template argument 4 is invalid
		questmanager.h:237: error: 'boost' has not been declared
		questmanager.h:237: error: ISO C++ forbids declaration of 'unordered_map' with no type
		questmanager.h:237: error: typedef name may not be a nested-name-specifier
		questmanager.h:237: error: expected ';' before '<' token
		questmanager.h:238: error: 'boost' has not been declared
		questmanager.h:238: error: ISO C++ forbids declaration of 'unordered_map' with no type
		questmanager.h:238: error: typedef name may not be a nested-name-specifier
		questmanager.h:238: error: expected ';' before '<' token
		questmanager.h:240: error: 'THashMapQuestName' does not name a type
		questmanager.h:241: error: 'THashMapQuestStartScript' does not name a type
		BattleArena.cpp: In constructor 'CBattleArena::CBattleArena()':
		BattleArena.cpp:15: error: class 'CBattleArena' does not have any field named 'm_pEvent'
		BattleArena.cpp: At global scope:
		BattleArena.cpp:89: error: 'LPEVENT' was not declared in this scope
		BattleArena.cpp:89: error: expected primary-expression before 'long'
		BattleArena.cpp:89: error: initializer expression list treated as compound expression
		BattleArena.cpp:90: error: expected ',' or ';' before '{' token
		Makefile:112: recipe for target 'OBJDIR/BattleArena.o' failed
		gmake[1]: *** [OBJDIR/BattleArena.o] Error 1
		gmake[1]: Leaving directory '/root/workspace/Server/game/src'
		Makefile:59: recipe for target 'all' failed
		gmake: *** [all] Error 2				
			

 

Link to comment
Share on other sites

  • 3 years later...

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.