cygwin dll -
10-19-2005
, 05:01 PM
--------------070708060907010004040701
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hi,
after all the comment about cygwin and mysql/mysqlpp (++?) i dont want
to raise people's hopes...
I built mysqlpp.dll, and linked it against examples simple1, and reset.
Seems to work. I'm not sure whats going on either, exactly.
I copied the dll into the example directory.
Attached files:
Makefile.simple builds the dll against 2.0.6 sources
build builds the simple1 and resetdb examples
I used 4.1.12 mysql built and installed on cygwin in the default place.
regards,
ahnkle
--------------070708060907010004040701
Content-Type: text/plain;
name="Makefile.simple"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Makefile.simple"
CXX=g++
CXXFLAGS=-shared -I/usr/local/include/mysql -I.. -O2 -c
LIB_BASE=mysqlpp
LIB_FILE=$(LIB_BASE).dll
IMP_FILE=
LD=ar
LDFLAGS=cru $(LIB_FILE)
EX_BIN_DIR=$(LIB_BASE)/output
BIN_DIR=./
INST_DIR=/usr/local
INST_INC_DIR=$(INST_DIR)/include
INST_LIB_DIR=$(INST_DIR)/lib_dll
DEL=rm -f
..SUFFIXES: .cpp .o
..cpp.o:
$(CXX) $(CXXFLAGS) $<
install_platform:
mkdir -p $(INST_INC_DIR) $(INST_LIB_DIR)
cp *.h $(INST_INC_DIR)
cp $(LIB_FILE) $(INST_LIB_DIR)
OBJS= connection.o \
datetime.o \
field_names.o \
field_types.o \
fields.o \
manip.o \
myset.o \
qparms.o \
query.o \
result.o \
row.o \
sql_string.o \
string_util.o \
type_info.o \
vallist.o
BIN_DIR_OBJS=$(addprefix $(BIN_DIR)/, $(OBJS))
all debug: $(OBJS) $(LIB_FILE) $(IMP_FILE)
..PHONY: release
release:
$(MAKE) BIN_DIR=release
clean:
$(RM) -v *dll *o *lib
$(LIB_FILE): $(OBJS)
g++ -shared -o mysqlpp.dll --enable-auto-import $(OBJS) -lstdc++ -L/usr/local/lib/mysql/ -lmysqlclient -lz
#$(LIB_FILE): $(OBJS)
# $(LD) $(LDFLAGS) $(BIN_DIR_OBJS) $(LDEXE) $(LIBS)
# $(RM) $(EX_BIN_DIR)*
coldata.o: coldata.cpp coldata.h
connection.o: connection.cpp connection.h
datetime.o: datetime.cpp datetime.h
field_names.o: field_names.cpp field_names.h
field_types.o: field_types.cpp field_types.h
fields.o: fields.cpp fields.h resiter.h
manip.o: manip.cpp manip.h
myset.o: myset.cpp myset.h
qparms.o: qparms.cpp qparms.h
query.o: query.cpp query.h resiter.h
result.o: result.cpp result.h resiter.h
row.o: row.cpp row.h resiter.h
sql_string.o: sql_string.cpp sql_string.h
string_util.o: string_util.cpp string_util.h
type_info.o: type_info.cpp type_info.h
vallist.o: vallist.cpp vallist.h
--------------070708060907010004040701
Content-Type: text/plain;
name="build"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="build"
#!/bin/sh -ex
#
g++ -c -g -Wall -I/usr/local/include/mysql -I/usr/local/include/mysql++ util.cpp
g++ -c -g -Wall -I/usr/local/include/mysql -I/usr/local/include/mysql++ simple1.cpp
g++ -o simple1 simple1.o util.o -L./ -lmysqlpp
g++ -c -g -Wall -I/usr/local/include/mysql -I/usr/local/include/mysql++ resetdb.cpp
g++ -o resetdb resetdb.o util.o -L./ -lmysqlpp
--------------070708060907010004040701
Content-Type: text/plain; charset=us-ascii
--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe: http://lists.mysql.com/plusplus?unsu...ie.nctu.edu.tw
--------------070708060907010004040701-- |