haski123
Advanced User
- Joined
- Apr 17, 2008
- Messages
- 206
- Reaction score
- 6
Witam.
Mam pewien problem z kompilacj? silnika DevLand pod 8.0. Silnik oczywiscie SQL.
Oto log z Kompilacji:
Zamieszczam tak?e pliki, kt?re zosta?y wy?ej podane.
Definitions.h:
Account.cpp:
configmanager.h:
Bardzo prosi?bym o szybk? pomoc, Haski123.
Mam pewien problem z kompilacj? silnika DevLand pod 8.0. Silnik oczywiscie SQL.
Oto log z Kompilacji:
Code:
Kompilator: MinGW GCC 4.6.2 32-bit
Building Makefile "ASDASD\Source\Makefile.win"
Wykonywanie make...
mingw32-make.exe -f "ASDASD\Source\Makefile.win" all
g++.exe -D__DEBUG__ -c ../account.cpp -o obj/account.o -I"D:/Programy/Dev-Cpp/MinGW32/include" -D__WINDOWS__ -D__SKULLSYSTEM__ -D__DEBUG_PLAYERS__ -D__PARTYSYSTEM__ -D__PB_BUY_HOUSE__ -D__YUR_CMD_EXT__ -D__YUR_NPC_EXT__ -D__CHANGE_SEX__ -D__LOOSIK_RECORD__ -D__SILV_MC_CHECK__ -D__CAP_CONFIG__ -D__TC_GM_INVISIBLE__ -D__TR_ANTI_AFK__ -D__DEATH_LIST__ -D__GM_WINDOW__ -D__XID_IMAGIC__ -D__XID_SEPERATE_ADDONS__ -D__PVP_ARENA__ -D__BB_OPPACC__ -D__PVP_ARENA__ -D__CHANGE_MAX__ -D__XID_BLESS_SYSTEM__ -D__XID_CLEAN_MAP__ -D__PREMIUM__ -g3
In file included from ../definitions.h:26:0,
from ../account.cpp:26:
../configmanager.h:28:17: fatal error: lua.h: No such file or directory
compilation terminated.
mingw32-make.exe: *** [obj/account.o] Error 1
Wykonanie zako?czone
Zamieszczam tak?e pliki, kt?re zosta?y wy?ej podane.
Definitions.h:
Code:
//////////////////////////////////////////////////////////////////////
// OpenTibia - an opensource roleplaying game
//////////////////////////////////////////////////////////////////////
// various definitions needed by most files
//////////////////////////////////////////////////////////////////////
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//////////////////////////////////////////////////////////////////////
#ifndef __OTSERV_DEFINITIONS_H__
#define __OTSERV_DEFINITIONS_H__
#include "exception.h"
#include "configmanager.h"
extern ConfigManager g_config;
#ifdef __PARTYSYSTEM__
#ifndef __SKULLSYSTEM__
#undef __PARTYSYSTEM__
#endif
#endif
#ifdef XML_GCC_FREE
#define xmlFreeOTSERV(s) free(s)
#else
#define xmlFreeOTSERV(s) xmlFree(s)
#endif
#ifdef __DEBUG_EXCEPTION_REPORT__
#define DEBUG_REPORT int *a = NULL; *a = 1;
#else
#ifdef __EXCEPTION_TRACER__
#define DEBUG_REPORT ExceptionHandler::dumpStack();
#else
#define DEBUG_REPORT
#endif
#endif
#ifdef __USE_SQLITE__
#define __SPLIT_QUERIES__
#endif
#if defined __USE_MYSQL__ || __USE_SQLITE__
#define USE_SQL_ENGINE
#endif
#if defined(__USE_MYSQL__) && !defined(__USE_SQLITE__)
#define USE_MYSQL_ONLY
#endif
#define ACCESS_ENTER g_config.getNumber(ConfigManager::ACCESS_ENTER)
#define ACCESS_PROTECT g_config.getNumber(ConfigManager::ACCESS_PROTECT)
#define ACCESS_HOUSE g_config.getNumber(ConfigManager::ACCESS_HOUSE)
#define ACCESS_TALK g_config.getNumber(ConfigManager::ACCESS_TALK)
#define ACCESS_MOVE g_config.getNumber(ConfigManager::ACCESS_MOVE)
#define ACCESS_LOOK g_config.getNumber(ConfigManager::ACCESS_LOOK)
#if defined __WINDOWS__ || defined WIN32
#ifndef __FUNCTION__
#define __FUNCTION__ __func__
#endif
#define OTSYS_THREAD_RETURN void
#define EWOULDBLOCK WSAEWOULDBLOCK
#ifdef __GNUC__
#include <ext/hash_map>
#include <ext/hash_set>
#define OTSERV_HASH_MAP __gnu_cxx::hash_map
#define OTSERV_HASH_SET __gnu_cxx::hash_set
#define ATOI64 atoll
#else
typedef unsigned long long uint64_t;
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <hash_map>
#include <hash_set>
#include <limits>
#include <assert.h>
#include <time.h>
#define OTSERV_HASH_MAP stdext::hash_map
#define OTSERV_HASH_SET stdext::hash_set
#include <cstring>
inline int strcasecmp(const char *s1, const char *s2)
{
return ::_stricmp(s1, s2);
}
inline int strncasecmp(const char *s1, const char *s2, size_t n)
{
return ::_strnicmp(s1, s2, n);
}
typedef signed long long int64_t;
typedef unsigned long uint32_t;
typedef signed long int32_t;
typedef unsigned short uint16_t;
typedef signed short int16_t;
typedef unsigned char uint8_t;
#define ATOI64 _atoi64
#pragma warning(disable:4786) // msvc too long debug names in stl
#pragma warning(disable:4250) // 'class1' : inherits 'class2::member' via dominance
#endif
//*nix systems
#else
#define OTSYS_THREAD_RETURN void*
#include <stdint.h>
#include <string.h>
#include <ext/hash_map>
#include <ext/hash_set>
#include <assert.h>
#define OTSERV_HASH_MAP __gnu_cxx::hash_map
#define OTSERV_HASH_SET __gnu_cxx::hash_set
#define ATOI64 atoll
#endif
#endif
Account.cpp:
Code:
//////////////////////////////////////////////////////////////////////
// OpenTibia - an opensource roleplaying game
//////////////////////////////////////////////////////////////////////
//
//////////////////////////////////////////////////////////////////////
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//////////////////////////////////////////////////////////////////////
#include "otpch.h"
#include <algorithm>
#include <functional>
#include <iostream>
#include "definitions.h"
#include "account.h"
Account::Account()
{
accnumber = 0;
}
Account::~Account()
{
charList.clear();
}
configmanager.h:
Code:
//////////////////////////////////////////////////////////////////////
// OpenTibia - an opensource roleplaying game
//////////////////////////////////////////////////////////////////////
//
//////////////////////////////////////////////////////////////////////
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//////////////////////////////////////////////////////////////////////
#ifndef _CONFIG_MANAGER_H
#define _CONFIG_MANAGER_H
#include <string>
extern "C"
{
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
}
class ConfigManager {
public:
ConfigManager();
~ConfigManager();
enum string_config_t {
CONFIG_FILE = 0,
DATA_DIRECTORY,
MAP_FILE,
MAP_STORE_FILE,
HOUSE_STORE_FILE,
HOUSE_RENT_PERIOD,
MAP_KIND,
BAN_FILE,
LOGIN_MSG,
SERVER_NAME,
WORLD_NAME,
OWNER_NAME,
OWNER_EMAIL,
URL,
LOCATION,
IP,
MOTD,
MD5_PASS,
WORLD_TYPE,
SQL_HOST,
SQL_USER,
SQL_PASS,
SQL_DB,
SQLITE_DB,
SQL_TYPE,
MAP_HOST,
MAP_USER,
MAP_PASS,
MAP_DB,
OTSERV_DB_HOST,
BATTLE_FIGHT,
#ifdef __PREMIUM__
FREE_PREMIUM,
#endif
ANIMATED_SPELLS,
CAP_SYSTEM,
REMOVE_DISTANCE,
REMOVE_RUNES,
LAST_STRING_CONFIG /* this must be the last one */
};
enum integer_config_t {
LOGIN_TRIES = 0,
RETRY_TIMEOUT,
LOGIN_TIMEOUT,
PORT,
MOTD_NUM,
MAX_PLAYERS,
EXHAUSTED,
EXHAUSTED_ADD,
FIGHTEXHAUSTED,
PZ_LOCKED,
MIN_ACTIONTIME,
MIN_ACTIONEXTIME,
DEFAULT_DESPAWNRANGE,
DEFAULT_DESPAWNRADIUS,
ALLOW_CLONES,
RATE_EXPERIENCE,
RATE_SKILL,
RATE_LOOT,
RATE_MAGIC,
RATE_SPAWN,
HOTKEYS,
MAX_MESSAGEBUFFER,
OTSERV_DB_ENABLED,
SAVE_CLIENT_DEBUG_ASSERTIONS,
CHECK_ACCOUNTS,
ACCESS_ENTER,
ACCESS_PROTECT,
ACCESS_HOUSE,
ACCESS_TALK,
ACCESS_MOVE,
ACCESS_LOOK,
#ifdef __PB_BUY_HOUSE__
HOUSE_PRICE,
HOUSE_LEVEL,
#endif
#ifdef __YUR_CMD_EXT__
SERVER_SAVE,
#endif
BAN_UNJUST,
RED_UNJUST,
BAN_TIME,
FRAG_TIME,
WHITE_TIME,
#ifdef __TR_ANTI_AFK__
KICK_TIME,
#endif
#ifdef __DEATH_LIST__
MAX_DEATH_ENTRIES,
#endif
PROTECT_LEVEL,
EXP_COLOR,
LAST_INTEGER_CONFIG /* this must be the last one */
};
bool loadFile(const std::string& _filename);
bool reload();
std::string getString(int _what) { return m_confString[_what]; };
int getNumber(int _what);
bool setNumber(int _what, int _value);
private:
std::string getGlobalString(lua_State* _L, const std::string& _identifier, const std::string& _default="");
int getGlobalNumber(lua_State* _L, const std::string& _identifier, const int _default=0);
std::string getGlobalStringField(lua_State* _L, const std::string& _identifier, const int _key, const std::string& _default="");
bool m_isLoaded;
std::string m_confString[LAST_STRING_CONFIG];
int m_confInteger[LAST_INTEGER_CONFIG];
};
#endif /* _CONFIG_MANAGER_H */
Bardzo prosi?bym o szybk? pomoc, Haski123.