Having managed to get EQEmu running successfully on a Windows machine in the past, I decided that I wanted to also have it running on my new RedHat 9 server. I've just spent most of the day overcoming the millions of different problems I've had with the process so far, but now I've come across something which has me well and truly stuck!
I've managed to (eventually) get
world and
libEMuShareMem.so compiled, but I've having problems with
zone.
Here are the errors when I issue the make command:
Quote:
# make
gcc -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wcomment -Wcast-align -Winline -Wno-deprecated -g -march=i686 -O -pthread -pipe -DFX -D_GNU_SOURCE -DINVERSEXY -DWORLD -DDEBUG=5 -DSHAREMEM -DCATCH_CRASH -DNO_PIDLOG -DFIELD_ITEMS -I/usr/include/mysql -I/usr/mysql/include ../common/EQNetwork.o ../common/timer.o ../common/packet_dump.o ../common/packet_functions.o ../common/unix.o ../common/packet_dump_file.o ../common/Mutex.o ../common/MiscFunctions.o zone.o entity.o mob.o client.o client_process.o npc.o net.o spawn2.o attack.o hate_list.o ../common/serverinfo.o ../common/moremath.o worldserver.o spells.o spawngroup.o loottables.o faction.o Map.o PlayerCorpse.o petitions.o MobAI.o Object.o ../common/eqtime.o groups.o ../common/classes.o ../common/races.o ../common/TCPConnection.o forage.o ../common/crc32.o ../common/guilds.o ../common/md5.o ../common/dbcore.o ../common/dbasync.o zonedbasync.o parser.o beacon.o ../common/EMuShareMem.o ../common/EQEMuError.o .obj/debug.o .obj/database.o .obj/Item.o .obj/misc.o doors.o command.o -rdynamic -L. -lstdc++ -lm -lz -L/usr/lib/mysql -L/usr/mysql/lib -lmysqlclient -ldl -o zone
zone.o(.text+0xdb): In function `Zone::Bootup(unsigned, bool)':
/usr/include/c++/3.2.2/bits/stl_tree.h:107: undefined reference to `Database::GetNPCType(unsigned)'
zone.o(.text+0x3282): In function `Zone:epop()':
/root/eqemu/zone/zone.cpp:802: undefined reference to `Database::GetNPCType(unsigned)'
zone.o(.text+0x5384): In function `Database::LoadZoneState(char const*, LinkedList<Spawn2*>&':
/root/eqemu/zone/zone.cpp:1329: undefined reference to `Database::GetNPCType(unsigned)'
client_process.o(.text+0x9a4): In function `Client::HandlePacket(APPLAYER const*)':
/root/eqemu/zone/client.h:268: undefined reference to `Database::GetAATimers(unsigned)'
spawn2.o(.text+0x38f): In function `Spawn2::Process()':
/root/eqemu/zone/spawn2.cpp:96: undefined reference to `Database::GetNPCType(unsigned)'
parser.o(.text+0x443: In function `Parser::ExCommands(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, unsigned, Mob*, Mob*)':
/usr/include/stdlib.h:382: undefined reference to `Database::GetNPCType(unsigned)'
parser.o(.text+0xb79a):/usr/include/stdlib.h:382: undefined reference to `Database::GetNPCType(unsigned)'
command.o(.text+0x7ffd): In function `command_gassign(Client*, Seperator const*)':
/root/eqemu/zone/mob.h:311: undefined reference to `Database::AssignGrid(Client*, float, float, unsigned)'
command.o(.text+0xafe6): In function `command_npctypespawn(Client*, Seperator const*)':
/usr/include/stdlib.h:382: undefined reference to `Database::GetNPCType(unsigned)'
command.o(.text+0xc3dd): In function `command_viewnpctype(Client*, Seperator const*)':
/root/eqemu/zone/command.cpp:2901: undefined reference to `Database::GetNPCType(unsigned)'
collect2: ld returned 1 exit status
make: *** [zone] Error 1
|
As you can see, there are lots of "undefined reference to Database::" type errors, which lead me to believe that it's not successfully finding the database.cpp / database.h files in the common directory. However, there's nothing in my makefile which seems to be obviously causing this problem. The contents of my makefile are as follows:
Quote:
APP=zone
SF=../common/EQNetwork.o \
../common/timer.o ../common/packet_dump.o ../common/packet_functions.o \
../common/unix.o ../common/packet_dump_file.o ../common/Mutex.o ../common/MiscFunctions.o \
zone.o entity.o mob.o client.o client_process.o npc.o net.o spawn2.o attack.o hate_list.o \
../common/serverinfo.o ../common/moremath.o worldserver.o spells.o spawngroup.o loottables.o \
faction.o Map.o PlayerCorpse.o petitions.o MobAI.o Object.o ../common/eqtime.o \
groups.o ../common/classes.o ../common/races.o ../common/TCPConnection.o forage.o \
../common/crc32.o ../common/guilds.o ../common/md5.o ../common/dbcore.o \
../common/dbasync.o zonedbasync.o parser.o beacon.o\
../common/EMuShareMem.o ../common/EQEMuError.o \
.obj/debug.o .obj/database.o .obj/Item.o .obj/misc.o \
doors.o command.o
CC=gcc
LINKER=gcc
DFLAGS=-DDEBUG=5 -DSHAREMEM -DCATCH_CRASH -DNO_PIDLOG -DFIELD_ITEMS
WFLAGS=-Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wcomment -Wcast-align -Winline -Wno-deprecated
COPTS=$(WFLAGS) -g -march=i686 -O -pthread -pipe -DFX -D_GNU_SOURCE -DINVERSEXY -DWORLD $(DFLAGS) -I/usr/include/mysql -I/usr/mysql/include
LINKOPTS=-rdynamic -L. -lstdc++ -lm -lz -L/usr/lib/mysql -L/usr/mysql/lib -lmysqlclient -ldl
all: $(APP)
$(APP): $(SF)
$(LINKER) $(COPTS) $(OBJS) $^ $(LINKOPTS) -o $@
import_raw_items: import_raw_items.o
$(LINKER) $(COPTS) $^ $(LINKOPTS) -o $@
clean:
rm -f $(SF) $(APP) import_raw_items.o import_raw_items
%.o: %.cpp
$(CC) -c $(COPTS) $< -o $@
.obj/debug.o: ../common/debug.cpp ../common/debug.h
mkdir -p .obj
$(CC) $(COPTS) -c ../common/debug.cpp -o .obj/debug.o
.obj/database.o: ../common/database.cpp ../common/database.h
mkdir -p .obj
$(CC) $(COPTS) -c ../common/database.cpp -o .obj/database.o
.obj/Item.o: ../common/Item.cpp ../common/Item.h
mkdir -p .obj
$(CC) $(COPTS) -c ../common/Item.cpp -o .obj/Item.o
.obj/misc.o: ../common/misc.cpp ../common/misc.h
mkdir -p .obj
$(CC) $(COPTS) -c ../common/misc.cpp -o .obj/misc.o
|
If anyone could help, I really would be eternally grateful! Thanks in advance!