Hi there,
I was able to compile MySQL++ just fine after hacking Makefile to remove
compiling examples, but see below for the error I got. I have the
following link problems when trying the examples:
[dsmith@saquri01 examples]$ make -f Makefile.simple clean && make -f
Makefile.simple
rm -f *.o resetdb simple1 custom1 custom2 custom3 custom4 fieldinf1 dbinfo
cgi_image load_file updel
g++ -I/opt/mysql++/mysql++-1.7.40/include -I/usr/local/mysql/include/mysql
-O2 -c resetdb.cpp
g++ -I/opt/mysql++/mysql++-1.7.40/include -I/usr/local/mysql/include/mysql
-O2 -c util.cpp
g++ resetdb.o util.o -o resetdb -lmysqlpp -lmysqlclient
-L/opt/mysql++/mysql++-1.7.40/lib -L/usr/local/mysql/lib/mysql
resetdb.o(.gnu.linkonce.r._ZTCN7mysqlpp5QueryE0_Sd+0x18): undefined
reference to `std::basic_iostream<char, std::char_traits<char>
>::~basic_iostream()'
resetdb.o(.gnu.linkonce.r._ZTCN7mysqlpp5QueryE0_Sd+0x28): undefined
reference to `std::basic_iostream<char, std::char_traits<char>
>::~basic_iostream()'
resetdb.o(.gnu.linkonce.r._ZTCN7mysqlpp8SQLQueryE0_Sd+0x18): undefined
reference to `std::basic_iostream<char, std::char_traits<char>
>::~basic_iostream()'
resetdb.o(.gnu.linkonce.r._ZTCN7mysqlpp8SQLQueryE0_Sd+0x28): undefined
reference to `std::basic_iostream<char, std::char_traits<char>
>::~basic_iostream()'
collect2: ld returned 1 exit status
make: *** [resetdb] Error 1
I added -lstdc++ to Makefile.simple just in case but it doesn't help. I'm
not sure why the destructor for basic_iostream is not found. Has anyone
run into this before? I read the manual, the FAQ, searched the mailing
list, and did a google search but couldn't find anything relevant.
TIA,
Dale Smith, Ph.D.
dalesmith@stripped
DTCC Risk Management
Quantitative Group
212-855-7641