View Single Post
  #1  
Old 04-28-2003, 10:09 AM
Sandabus
Fire Beetle
 
Join Date: Apr 2003
Posts: 10
Default Problem with Linux Compile. Help please.

Ok. I've got a problem compiling EQEMU on Linux.
I'm running Redhat 9.0 and have the following
MySQL RPM's installed.

MySQL-client-4.0.12-0
MySQL-shared-4.0.12-0
perl-DBD-MySQL-2.1021-3
MySQL-embedded-4.0.12-0
MySQL-devel-4.0.12-0
MySQL-server-4.0.12-0

I'm running gcc-3.2.2-5
and I'm getting the following error(s)

gcc -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wbad-function-cast -Wstrict-prototypes -Wnested-externs -Wcomment -Wcast-align -Winline -Wno-deprecated -g -march=i686 -O -pthread -pipe -DFX -D_GNU_SOURCE -DINVERSEXY -DWORLD -DDEBUG=1 -DSHAREMEM -DCATCH_CRASH -I/usr/include/mysql ../common/EQNetwork.o ../common/timer.o ../common/database.o ../common/packet_dump.o ../common/races.o ../common/unix.o ../common/Mutex.o ../common/MiscFunctions.o ../common/serverinfo.o ../common/packet_functions.o ../common/classes.o ../common/TCPConnection.o ../common/eqtime.o ../common/crc32.o client.o net.o console.o zoneserver.o LoginServer.o
../common/md5.o ../common/dbcore.o ../common/dbasync.o ../common/EMuShareMem.o .obj/debug.o -rdynamic -L. -lstdc++ -lm -lz -L/usr/lib/mysql -lmysqlclient -ldl -o world
/usr/lib/mysql/libmysqlclient.a(my_compress.o)(.text+0xaa): In function `my_uncompress':
: undefined reference to `uncompress'
/usr/lib/mysql/libmysqlclient.a(my_compress.o)(.text+0x13c): In function `my_compress_alloc':
: undefined reference to `compress'
collect2: ld returned 1 exit status
make: *** [world] Error 1


(I'm getting for both of the world and zone compiles but I'm only putting one up since they
look basically the same).

This is my makefile (Below)
APP=world
SF=../common/EQNetwork.o \
../common/timer.o ../common/database.o ../common/packet_dump.o ../common/races.o ../common/unix.o \
../common/Mutex.o ../common/MiscFunctions.o ../common/serverinfo.o ../common/packet_functions.o \
../common/classes.o ../common/TCPConnection.o ../common/eqtime.o ../common/crc32.o \
client.o net.o console.o zoneserver.o LoginServer.o ../common/md5.o ../common/dbcore.o \
../common/dbasync.o ../common/EMuShareMem.o .obj/debug.o

CC=gcc
LINKER=gcc
DFLAGS=-DDEBUG=1 -DSHAREMEM -DCATCH_CRASH
WFLAGS=-Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wbad-function-cast -Wstrict-prototypes -Wnested-externs -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
LINKOPTS=-rdynamic -L. -lstdc++ -lm -lz -L/usr/lib/mysql -lmysqlclient -ldl
all: $(APP)

$(APP): $(SF)
$(LINKER) $(COPTS) $(OBJS) $^ $(LINKOPTS) -o $@

clean:
rm -f $(SF) $(APP)

%.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




So basically, can anyone tell me what I need to
do to fix this?

Thanks, Sandabus
Reply With Quote