Quote:
Originally Posted by Darkmeerkat
Thanks, that got me past that part. Now it just throws this error:
I'm assuming it's choking trying to find the MySQL libraries (Which are located in /usr/local/bin/mysql/lib, but linked to in /usr/bin). I dinked around with it a little, and eventually modified the decleration part of the makefile to::
Code:
CC=gcc
LINKER=gcc
MYSQL_FLAGS=`mysql_config --cflags`
# Making this link directly to the libs didn't work. (returned "/usr/local/bin/mysql/lib is a directory", then a bunch of undefined errors.)
#MYSQL_LIB=`/usr/local/bin/mysql/lib/`
DFLAGS=-DEQDEBUG=5 -DNO_PIDLOG -DSHAREMEM -DSPELL_EFFECT_SPAM -DFIELD_ITEMS
WFLAGS=-Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wno-deprecated -Wcomment -Wcast-align
COPTS=$(WFLAGS) -O2 -ggdb -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE $(DFLAGS) $(MYSQL_FLAGS)
#LINKOPTS=-rdynamic -L. -lstdc++ -ldl $(MYSQL_LIB)
LINKOPTS=-rdynamic -L. -lstdc++ -ldl -L/usr/bin -lmysqlclient -lz -lcrypt -lnsl -lm -lc -lnss_files -lnss_dns -lresolv -lc-lnss_files -lnss_dns -lresolv
It now returns this when I make it:
Am I not including the right libraries?
|
This is a common problem with development code in many projects. To resolve it (OK, bad joke I know!) use grep:
Code:
cd ${your_source_directory}
grep -r "Object::MethodName" | grep cpp
You'll get a list of all the places that the symbol is used in the cource code. Look at the list, and select a likely culprit - let's assume we decide "common/opcodemgr.cpp" is a good one to try.
Check that it's not in the "APP" line in the makefile. Then APPEND it to that line. Rerun "make clean && make".
Either that fixes it (and possibly another link error shows itself) or it doesnt, in which case you replace the thing you added to the makefile with another likely suspect.
Note that not knowing this kind of stuff suggests you are a bit out of your depth, and a course or decent book on C++ might be a good idea. There's some decent stuff in the LDP (Programming HOWTO for example )to read if you are very bright.