Ok i am trying to compile smuagfuss with a mysql option under cygwin. this is the top part of my make file.
CC = g++
#PROF = -p
#Uncomment to compile in Cygwin
CYGWIN = -DCYGWIN
#repoint these to your mysql directories
MYSQL = -L/usr/local/lib/mysql -I/usr/local/include/mysql/
#Uncomment the line below if you are getting undefined references to dlsym, dlopen, and dlclose.
#Comment it out if you get errors about ldl not being found.
NEED_DL = -ldl
#Some systems need this for dynamic linking to work.
EXPORT_SYMBOLS = -export-dynamic
# Uncomment the two lines below if compiling on a Solaris box
#SOLARIS_FLAG = -Dsun -DSYSV
#SOLARIS_LINK = -lnsl -lsocket
#IMC2 - Comment out to disable IMC2 support
#IMC = 1
W_FLAGS = -Wall -Werror -Wshadow -Wformat-security -Wpointer-arith -Wcast-align -Wredundant-decls
C_FLAGS = -g2 $(W_FLAGS) $(SOLARIS_FLAG) $(PROF) $(EXPORT_SYMBOLS)
L_FLAGS = $(PROF) $(SOLARIS_LINK) -lz $(NEED_DL) $(MYSQL)
#D_FLAGS : For the DNS Slave process. No need in linking all the extra libs for this.
D_FLAGS = -g2 -O $(PROF) $(SOLARIS_LINK)
C_FILES = act_comm.c act_info.c act_move.c act_obj.c act_wiz.c ban.c boards.c \
build.c calendar.c chess.c clans.c color.c comm.c comments.c const.c db.c deity.c \
dns.c fight.c handler.c hashstr.c hint.c hotboot.c imm_host.c interp.c \
liquids.c magic.c makeobjs.c mapout.c mapper.c mccp.c \
misc.c mpxset.c mud_comm.c mud_prog.c news.c planes.c player.c polymorph.c \
renumber.c reset.c save.c services.c sha256.c shops.c skills.c special.c tables.c \
track.c update.c variables.c weather.c mysql.c
As you can see i am pointing to the mysql folders, when i compile the mud i get
Compiling o/mysql.o....
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: warning: auto-importing has been activated without --enable-auto-import specified on th
command line.
This should work unless it involves constant data structures referencing symbols from auto-imported DLLs.o/mysql.o: In function `_Z7open_dbv':
/home/smaugfuss/src/mysql.c:22: undefined reference to `_mysql_init'
/home/smaugfuss/src/mysql.c:27: undefined reference to `_mysql_real_connect'
/home/smaugfuss/src/mysql.c:30: undefined reference to `_mysql_close'
o/mysql.o: In function `_Z8close_dbv':
/home/smaugfuss/src/mysql.c:38: undefined reference to `_mysql_close'
Info: resolving __timezone by linking to __imp___timezone (auto-import)
collect2: ld returned 1 exit status
make[1]: *** [smaug] Error 1
make: *** [all] Error 2
Any clues to what could be wrong?
I configured mySQL correctly when i built it or atleast i beleve so.
CC = g++
#PROF = -p
#Uncomment to compile in Cygwin
CYGWIN = -DCYGWIN
#repoint these to your mysql directories
MYSQL = -L/usr/local/lib/mysql -I/usr/local/include/mysql/
#Uncomment the line below if you are getting undefined references to dlsym, dlopen, and dlclose.
#Comment it out if you get errors about ldl not being found.
NEED_DL = -ldl
#Some systems need this for dynamic linking to work.
EXPORT_SYMBOLS = -export-dynamic
# Uncomment the two lines below if compiling on a Solaris box
#SOLARIS_FLAG = -Dsun -DSYSV
#SOLARIS_LINK = -lnsl -lsocket
#IMC2 - Comment out to disable IMC2 support
#IMC = 1
W_FLAGS = -Wall -Werror -Wshadow -Wformat-security -Wpointer-arith -Wcast-align -Wredundant-decls
C_FLAGS = -g2 $(W_FLAGS) $(SOLARIS_FLAG) $(PROF) $(EXPORT_SYMBOLS)
L_FLAGS = $(PROF) $(SOLARIS_LINK) -lz $(NEED_DL) $(MYSQL)
#D_FLAGS : For the DNS Slave process. No need in linking all the extra libs for this.
D_FLAGS = -g2 -O $(PROF) $(SOLARIS_LINK)
C_FILES = act_comm.c act_info.c act_move.c act_obj.c act_wiz.c ban.c boards.c \
build.c calendar.c chess.c clans.c color.c comm.c comments.c const.c db.c deity.c \
dns.c fight.c handler.c hashstr.c hint.c hotboot.c imm_host.c interp.c \
liquids.c magic.c makeobjs.c mapout.c mapper.c mccp.c \
misc.c mpxset.c mud_comm.c mud_prog.c news.c planes.c player.c polymorph.c \
renumber.c reset.c save.c services.c sha256.c shops.c skills.c special.c tables.c \
track.c update.c variables.c weather.c mysql.c
As you can see i am pointing to the mysql folders, when i compile the mud i get
Compiling o/mysql.o....
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: warning: auto-importing has been activated without --enable-auto-import specified on th
command line.
This should work unless it involves constant data structures referencing symbols from auto-imported DLLs.o/mysql.o: In function `_Z7open_dbv':
/home/smaugfuss/src/mysql.c:22: undefined reference to `_mysql_init'
/home/smaugfuss/src/mysql.c:27: undefined reference to `_mysql_real_connect'
/home/smaugfuss/src/mysql.c:30: undefined reference to `_mysql_close'
o/mysql.o: In function `_Z8close_dbv':
/home/smaugfuss/src/mysql.c:38: undefined reference to `_mysql_close'
Info: resolving __timezone by linking to __imp___timezone (auto-import)
collect2: ld returned 1 exit status
make[1]: *** [smaug] Error 1
make: *** [all] Error 2
Any clues to what could be wrong?
I configured mySQL correctly when i built it or atleast i beleve so.