As you suggested, I commented out everything in resetdb.cpp except for the
connection object and tried to compile. Here are the results:
[dsmith@saquri01 examples]$ make
source='resetdb.cpp' object='resetdb.o' libtool=no \
depfile='.deps/resetdb.Po' tmpdepfile='.deps/resetdb.TPo' \
depmode=gcc3 /bin/sh ../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../lib -I/usr/local/mysql/include/mysql
-g -O2 -c -o resetdb.o `test -f 'resetdb.cpp' || echo './'`resetdb.cpp
/bin/sh ../libtool --mode=link g++ -g -O2 -L/usr/local/mysql/lib/mysql
-o resetdb resetdb.o util.o ../lib/libmysqlpp.la -lz -lmysqlclient
g++ -g -O2 -o .libs/resetdb resetdb.o util.o -L/usr/local/mysql/lib/mysql
../lib/.libs/libmysqlpp.so
/opt/mysql/4.1.10a-src/lib/mysql/libmysqlclient.so -lcrypt -lnsl -lm -lz
-Wl,--rpath -Wl,/opt/mysql++/mysql++-1.7.40/lib -Wl,--rpath
-Wl,/opt/mysql/4.1.10a-src/lib/mysql
../lib/.libs/libmysqlpp.so: undefined reference to
`std::basic_iostream<char, std::char_traits<char> >::~basic_iostream()'
../lib/.libs/libmysqlpp.so: undefined reference to
`std::basic_iostream<char, std::char_traits<char> >::~basic_iostream()'
collect2: ld returned 1 exit status
make: *** [resetdb] Error 1
Then I checked out Warren's first suggestion below. Here is the output of
nm:
[dsmith@saquri01 lib]$ nm --demangle libstdc++.so | more | grep
'~basic_iostream'
000000000008f990 t std::basic_iostream<char, std::char_traits<char>
>::~basic_iostream [in-charge deleting]()
000000000008f820 t std::basic_iostream<char, std::char_traits<char>
>::~basic_iostream [in-charge]()
000000000008f6f0 t std::basic_iostream<char, std::char_traits<char>
>::~basic_iostream [not-in-charge]()
0000000000090010 W std::basic_iostream<wchar_t, std::char_traits<wchar_t>
>::~basic_iostream [in-charge deleting]()
000000000008fea0 W std::basic_iostream<wchar_t, std::char_traits<wchar_t>
>::~basic_iostream [in-charge]()
000000000008fd70 W std::basic_iostream<wchar_t, std::char_traits<wchar_t>
>::~basic_iostream [not-in-charge]()
000000000008f980 W non-virtual thunk [nv:-16] to std::basic_iostream<char,
std::char_traits<char> >::~basic_iostream [in-charge deleting]()
000000000008f810 W non-virtual thunk [nv:-16] to std::basic_iostream<char,
std::char_traits<char> >::~basic_iostream [in-charge]()
0000000000090000 W non-virtual thunk [nv:-16] to
std::basic_iostream<wchar_t, std::char_traits<wchar_t> >::~basic_iostream
[in-charge deleting]()
000000000008fe90 W non-virtual thunk [nv:-16] to
std::basic_iostream<wchar_t, std::char_traits<wchar_t> >::~basic_iostream
[in-charge]()
000000000008f950 W virtual thunk [v:0,-24] to std::basic_iostream<char,
std::char_traits<char> >::~basic_iostream [in-charge deleting]()
000000000008f7e0 W virtual thunk [v:0,-24] to std::basic_iostream<char,
std::char_traits<char> >::~basic_iostream [in-charge]()
000000000008ffd0 W virtual thunk [v:0,-24] to std::basic_iostream<wchar_t,
std::char_traits<wchar_t> >::~basic_iostream [in-charge deleting]()
000000000008fe60 W virtual thunk [v:0,-24] to std::basic_iostream<wchar_t,
std::char_traits<wchar_t> >::~basic_iostream [in-charge]()
Although I'm familiar with using nm, what is this supposed to show? The
man page for nm is not exactly helpful.
I can't say for sure that the Query object is not implicated, as the above
shows the library itself generates link errors.
I would like to get mysql++ working on our SGI. I I would like to avoid
using the MySQL C api if I can.
Thanks for the assistance. Other suggestions are most welcome.
Dale Smith, Ph.D.
dalesmith@stripped
DTCC Risk Management
Quantitative Group
212-855-7641
Warren Young <mysqlpp@stripped>
06/10/2005 04:10 PM
To
MySQL++ Mailing List <plusplus@stripped>
cc
Subject
Re: Link errors with resetdb example program
Dale Smith wrote:
>
> my installation. I'm running a 64-bit Itanium platform; has anyone
> successfully used mysql++ on that platform before?
The last system in that class I used was a Cray Y-MP, back before Linux
had even been invented.
> resetdb.o(.gnu.linkonce.r._ZTCN7mysqlpp5QueryE0_Sd+0x18): undefined
> reference to `std::basic_iostream<char, std::char_traits<char>
> >::~basic_iostream()'
Check this GCC mailing list thread out:
http://gcc.gnu.org/ml/libstdc++/2004-09/msg00228.html
That link drops you into the middle of the thread, to a suggestion I'd
like you to try as well.
One other thing: can you hack resetdb.cpp to remove any uses of the
Query object? Basically, I want it to just connect to the database, and
exit. If that links, then this message may be relevant:
http://groups-beta.google.com/group/gnu.g++.help/browse_thread/thread/6b1cc4e3a0b8f1d0
...though not helpful, because nobody replied to it. Well, maybe
helpful: if the Query object is implicated, then this is yet more reason
to change it to not derive from std::stringstream.
--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:
http://lists.mysql.com/plusplus?unsub=1