- Mesaj
- 47
- Çözümler
- 1
- Beğeni
- 7
- Puan
- 424
- Ticaret Puanı
- 0
Merhabalar, db'yi ana dizinden gmake clean ve gmake all yaparak build almayı denerken hatalarla karşılaştım. Tam istediğim gibi bir konu kuramadım ancak eksik bilgi verdiysem bilgilendirirseniz düzeltirim.
Bu da MakeFile dosyam
ERROR:
compile Config.cpp
compile NetBase.cpp
In file included from ClientManager.h:13,
from NetBase.cpp:4:
DBManager.h:8:25: error: mysql/mysql.h: No such file or directory
In file included from DBManager.h:10,
from ClientManager.h:13,
from NetBase.cpp:4:
../../libsql/AsyncSQL.h:12:26: error: mysql/errmsg.h: No such file or directory
../../libsql/AsyncSQL.h:13:32: error: mysql/mysqld_error.h: No such file or directory
In file included from DBManager.h:10,
from ClientManager.h:13,
from NetBase.cpp:4:
../../libsql/AsyncSQL.h:35: error: ISO C++ forbids declaration of 'MYSQL_RES' with no type
../../libsql/AsyncSQL.h:35: error: expected ';' before '*' token
../../libsql/AsyncSQL.h: In constructor '_SQLResult::_SQLResult()':
../../libsql/AsyncSQL.h:22: error: class '_SQLResult' does not have any field named 'pSQLResult'
../../libsql/AsyncSQL.h: In destructor '_SQLResult::~_SQLResult()':
../../libsql/AsyncSQL.h:28: error: 'pSQLResult' was not declared in this scope
../../libsql/AsyncSQL.h:30: error: 'mysql_free_result' was not declared in this scope
../../libsql/AsyncSQL.h: At global scope:
../../libsql/AsyncSQL.h:98: error: ISO C++ forbids declaration of 'MYSQL' with no type
../../libsql/AsyncSQL.h:98: error: expected ';' before '*' token
../../libsql/AsyncSQL.h: In constructor '_SQLMsg::_SQLMsg()':
../../libsql/AsyncSQL.h:43: error: class '_SQLMsg' does not have any field named 'm_pkSQL'
../../libsql/AsyncSQL.h: In member function 'void _SQLMsg::Store()':
../../libsql/AsyncSQL.h:64: error: 'struct _SQLResult' has no member named 'pSQLResult'
../../libsql/AsyncSQL.h:64: error: 'm_pkSQL' was not declared in this scope
../../libsql/AsyncSQL.h:64: error: 'mysql_store_result' was not declared in this scope
../../libsql/AsyncSQL.h:65: error: 'mysql_insert_id' was not declared in this scope
../../libsql/AsyncSQL.h:66: error: 'mysql_affected_rows' was not declared in this scope
../../libsql/AsyncSQL.h:68: error: 'struct _SQLResult' has no member named 'pSQLResult'
../../libsql/AsyncSQL.h:70: error: 'struct _SQLResult' has no member named 'pSQLResult'
../../libsql/AsyncSQL.h:70: error: 'mysql_num_rows' was not declared in this scope
../../libsql/AsyncSQL.h:78: error: 'm_pkSQL' was not declared in this scope
../../libsql/AsyncSQL.h:78: error: 'mysql_next_result' was not declared in this scope
../../libsql/AsyncSQL.h: At global scope:
../../libsql/AsyncSQL.h:139: error: ISO C++ forbids declaration of 'MYSQL' with no type
../../libsql/AsyncSQL.h:139: error: expected ';' before '*' token
../../libsql/AsyncSQL.h:165: error: 'MYSQL' does not name a type
In file included from NetBase.cpp:4:
ClientManager.h:244: error: 'MYSQL_RES' has not been declared
ClientManager.h:245: error: 'MYSQL_RES' has not been declared
ClientManager.h:246: error: 'MYSQL_RES' has not been declared
ClientManager.h:247: error: 'MYSQL_RES' has not been declared
ClientManager.h:319: error: 'MYSQL_RES' has not been declared
Makefile:55: recipe for target '.obj/NetBase.o' failed
gmake[1]: *** [.obj/NetBase.o] Error 1
gmake[1]: Leaving directory '/home/mainline_released/Srcs/Server/db/src'
Makefile:80: recipe for target 'all' failed
gmake: *** [all] Error 2
Bu da MakeFile dosyam
MakeFile:
MAKE = gmake
CC = g++
INCDIR =
LIBDIR =
BINDIR = ..
OBJDIR = .obj
GCC_VERSION = $(shell $(CC) --version 2>&1 | grep "(GCC)" | cut -d' ' -f3 | cut -d'.' -f1)
BSD_VERSION = $(shell uname -v 2>&1 | cut -d' ' -f2 | cut -d'.' -f1)
#P4_VERSION = $(shell svnversion -n .)
SVN_VERSION = $(shell cat ../../__VERSION__)
P4_VERSION = $(shell cat ../../__VERSION__)
$(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi)
TARGET = $(BINDIR)/db_r$(P4_VERSION)
CFLAGS = -g -Wall -O2 -pipe -fno-rtti -fno-exceptions -pthread -fno-strict-aliasing -D_THREAD_SAFE
ifeq ($(GCC_VERSION), 4)
CFLAGS += -mtune=i686
else
CFLAGS += -mcpu=i686
endif
# boost
INCDIR += -I../../../Extern/include/boost
LIBDIR += -L../../libthecore/lib -L../../libsql -L../../libpoly -L../../libgame/lib
#MYSQL
INCDIR += -I../../../../../../usr/local/include/mysql
LIBDIR += -L../../../../../../usr/local/include/mysql
LIBS += /usr/local/lib/mysql/libmysqlclient.a /usr/lib/libz.a
LIBS = -lthecore -lsql -lpoly -lgame -lm -lz
SRCS = Config.cpp NetBase.cpp Peer.cpp PeerBase.cpp Main.cpp Lock.cpp DBManager.cpp \
Cache.cpp LoginData.cpp ClientManager.cpp ClientManagerPlayer.cpp ClientManagerLogin.cpp \
ClientManagerBoot.cpp ClientManagerParty.cpp ClientManagerGuild.cpp GuildManager.cpp HB.cpp \
PrivManager.cpp MoneyLog.cpp ItemAwardManager.cpp ClientManagerEventFlag.cpp Marriage.cpp \
Monarch.cpp BlockCountry.cpp ItemIDRangeManager.cpp ClientManagerHorseName.cpp version.cpp \
AuctionManager.cpp ProtoReader.cpp CsvReader.cpp
OBJS = $(SRCS:%.cpp=$(OBJDIR)/%.o)
default: $(TARGET)
$(TARGET): $(OBJS)
@echo linking ...
@$(CC) $(CFLAGS) $(LIBDIR) $(OBJS) $(LIBS) -o $(TARGET)
@touch version.cpp
$(OBJDIR)/%.o: %.cpp
@echo compile $<
@$(CC) $(CFLAGS) $(INCDIR) -c $< -o $@
$(OBJDIR)/version.o: version.cpp
@$(CC) $(CFLAGS) -D__USER__=\"$(USER)\" -D__HOSTNAME__=\"$(HOSTNAME)\" -D__PWD__=\"$(PWD)\" -D__P4_VERSION__=\"$(P4_VERSION)\" -c $< -o $@
@echo compile $<
$(OBJDIR):
@mkdir $(OBJDIR)
clean:
@rm -f $(OBJS) $(BINDIR)/db_r*
dep:
@touch Depend
makedepend -fDepend $(INCDIR) -I/usr/include/c++/3.3 -I/usr/include/c++/4.2 -p$(OBJDIR)/ $(SRCS) 2> /dev/null
sinclude Depend