List:MySQL++« Previous MessageNext Message »
From:joh3@lithophile.com Date:August 30 2007 9:27pm
Subject:Problem compiling the examples...
View as plain text  
Hi,
	I just upgraded to the 2.3.2 version and i am getting the following issue on
one of my machines, (the other works fine)....

when compiling the examples i get errors like "undefined reference to
mysqlpp::get_library_version()"

 i am using a amd64 gentoo linux distribution, and trying to build from the
package availible on the web, rather than use the older gentoo-ebuild, (though
this has the same issues).

incidentally 2.2.1 compiles just fine, on that very same machine....

any help someone could shed would be appreciated....the bottom of this contains
the error messages, and also the complete dump of the configure/make sequence.

Thanks in advance

Joe

--------
g++ -o resetdb resetdb_resetdb.o -L/usr/lib64   -L.    -lz  -lmysqlpp_util
-lmysqlclient -lmysqlpp -lz
resetdb_resetdb.o: In function `main':
./examples/resetdb.cpp:59: undefined reference to `mysqlpp::get_library_version()'
./examples/resetdb.cpp:65: undefined reference to `mysqlpp::get_library_version()'
./libmysqlpp_util.a(util_util.o): In function
`mysqlpp::Result::operator=(mysqlpp::Result const&)':
lib/result.h:343: undefined reference to
`mysqlpp::ResUse::operator=(mysqlpp::ResUse const&)'
./libmysqlpp_util.a(util_util.o): In function `long long
mysqlpp::ColData_Tmpl<mysqlpp::const_string>::conv<long long>(long long)
const':
lib/coldata.h:365: undefined reference to
`mysqlpp::strip_all_blanks(std::basic_string<char, std::char_traits<char>,
std::allocator<char> >&)'
./libmysqlpp_util.a(util_util.o): In function `double
mysqlpp::ColData_Tmpl<mysqlpp::const_string>::conv<double>(double) const':
lib/coldata.h:365: undefined reference to
`mysqlpp::strip_all_blanks(std::basic_string<char, std::char_traits<char>,
std::allocator<char> >&)'
collect2: ld returned 1 exit status
make: *** [resetdb] Error 1
---------


the full ./configure && make is below ....





configure: loading cache config.cache
checking build system type... (cached) x86_64-unknown-linux-gnu
checking host system type... (cached) x86_64-unknown-linux-gnu
checking target system type... (cached) x86_64-unknown-linux-gnu
checking for gcc... (cached) gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... (cached) o
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking for ranlib... (cached) ranlib
checking for a BSD-compatible install... (cached) /usr/bin/install -c
checking whether ln -s works... yes
checking whether make sets $(MAKE)... (cached) yes
checking for ar... (cached) ar
checking for strip... (cached) strip
checking for nm... (cached) nm
checking if make is GNU make... (cached) yes
checking for dependency tracking method... gcc
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking how to run the C preprocessor... (cached) gcc -E
checking for egrep... (cached) grep -E
checking for ANSI C header files... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for memory.h... (cached) yes
checking for strings.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for unistd.h... (cached) yes
checking for zlib.h... (cached) yes
checking for gzread in -lz... (cached) yes
checking whether -lm is needed to use C math functions... no
checking whether -lsocket is needed... no
checking whether -lnsl is needed... no
checking for MySQL library directory... /usr/lib64
checking for MySQL include directory... /usr/include/mysql
checking for mysql_store_result in -lmysqlclient... (cached) yes
checking for mysql_ssl_set in -lmysqlclient... (cached) yes
checking for localtime_r()... yes
checking for main in -lintl... (cached) no
checking for g++... (cached) g++
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking for STL slist extension... <ext/slist>, namespace __gnu_cxx
configure: creating ./config.status
config.status: creating Makefile
config.status: creating mysql++.spec
config.status: creating lib/Doxyfile
config.status: creating lib/mysql++.h
config.status: creating config.h
config.status: config.h is unchanged
jlovick@bumpy /export/whale/PS_code/PS_code/external_code/mysql++/mysql++-2.3.2
$ make
/export/whale/PS_code/PS_code/external_code/mysql++/mysql++-2.3.2/bk-deps g++ -c
-o mysqlpp_coldata.o -I. -fPIC -DPIC  -I/usr/include/mysql -g -O2 ./lib/coldata.cpp
/export/whale/PS_code/PS_code/external_code/mysql++/mysql++-2.3.2/bk-deps g++ -c
-o mysqlpp_connection.o -I. -fPIC -DPIC  -I/usr/include/mysql -g -O2
./lib/connection.cpp
/export/whale/PS_code/PS_code/external_code/mysql++/mysql++-2.3.2/bk-deps g++ -c
-o mysqlpp_datetime.o -I. -fPIC -DPIC  -I/usr/include/mysql -g -O2
./lib/datetime.cpp
/export/whale/PS_code/PS_code/external_code/mysql++/mysql++-2.3.2/bk-deps g++ -c
-o mysqlpp_field_names.o -I. -fPIC -DPIC  -I/usr/include/mysql -g -O2
./lib/field_names.cpp
/export/whale/PS_code/PS_code/external_code/mysql++/mysql++-2.3.2/bk-deps g++ -c
-o mysqlpp_fields.o -I. -fPIC -DPIC  -I/usr/include/mysql -g -O2 ./lib/fields.cpp
/export/whale/PS_code/PS_code/external_code/mysql++/mysql++-2.3.2/bk-deps g++ -c
-o mysqlpp_field_types.o -I. -fPIC -DPIC  -I/usr/include/mysql -g -O2
./lib/field_types.cpp
/export/whale/PS_code/PS_code/external_code/mysql++/mysql++-2.3.2/bk-deps g++ -c
-o mysqlpp_manip.o -I. -fPIC -DPIC  -I/usr/include/mysql -g -O2 ./lib/manip.cpp
/export/whale/PS_code/PS_code/external_code/mysql++/mysql++-2.3.2/bk-deps g++ -c
-o mysqlpp_myset.o -I. -fPIC -DPIC  -I/usr/include/mysql -g -O2 ./lib/myset.cpp
/export/whale/PS_code/PS_code/external_code/mysql++/mysql++-2.3.2/bk-deps g++ -c
-o mysqlpp_mysql++.o -I. -fPIC -DPIC  -I/usr/include/mysql -g -O2 ./lib/mysql++.cpp
/export/whale/PS_code/PS_code/external_code/mysql++/mysql++-2.3.2/bk-deps g++ -c
-o mysqlpp_qparms.o -I. -fPIC -DPIC  -I/usr/include/mysql -g -O2 ./lib/qparms.cpp
/export/whale/PS_code/PS_code/external_code/mysql++/mysql++-2.3.2/bk-deps g++ -c
-o mysqlpp_query.o -I. -fPIC -DPIC  -I/usr/include/mysql -g -O2 ./lib/query.cpp
/export/whale/PS_code/PS_code/external_code/mysql++/mysql++-2.3.2/bk-deps g++ -c
-o mysqlpp_result.o -I. -fPIC -DPIC  -I/usr/include/mysql -g -O2 ./lib/result.cpp
/export/whale/PS_code/PS_code/external_code/mysql++/mysql++-2.3.2/bk-deps g++ -c
-o mysqlpp_row.o -I. -fPIC -DPIC  -I/usr/include/mysql -g -O2 ./lib/row.cpp
/export/whale/PS_code/PS_code/external_code/mysql++/mysql++-2.3.2/bk-deps g++ -c
-o mysqlpp_sql_string.o -I. -fPIC -DPIC  -I/usr/include/mysql -g -O2
./lib/sql_string.cpp
/export/whale/PS_code/PS_code/external_code/mysql++/mysql++-2.3.2/bk-deps g++ -c
-o mysqlpp_string_util.o -I. -fPIC -DPIC  -I/usr/include/mysql -g -O2
./lib/string_util.cpp
/export/whale/PS_code/PS_code/external_code/mysql++/mysql++-2.3.2/bk-deps g++ -c
-o mysqlpp_transaction.o -I. -fPIC -DPIC  -I/usr/include/mysql -g -O2
./lib/transaction.cpp
/export/whale/PS_code/PS_code/external_code/mysql++/mysql++-2.3.2/bk-deps g++ -c
-o mysqlpp_type_info.o -I. -fPIC -DPIC  -I/usr/include/mysql -g -O2
./lib/type_info.cpp
/export/whale/PS_code/PS_code/external_code/mysql++/mysql++-2.3.2/bk-deps g++ -c
-o mysqlpp_vallist.o -I. -fPIC -DPIC  -I/usr/include/mysql -g -O2 ./lib/vallist.cpp
g++ -shared -fPIC -o libmysqlpp.so.2.3.2 mysqlpp_coldata.o mysqlpp_connection.o
mysqlpp_datetime.o mysqlpp_field_names.o mysqlpp_fields.o mysqlpp_field_types.o
mysqlpp_manip.o mysqlpp_myset.o mysqlpp_mysql++.o mysqlpp_qparms.o
mysqlpp_query.o mysqlpp_result.o mysqlpp_row.o mysqlpp_sql_string.o
mysqlpp_string_util.o mysqlpp_transaction.o mysqlpp_type_info.o
mysqlpp_vallist.o -L/usr/lib64  -Wl,-soname,libmysqlpp.so.2       -lz
-lmysqlclient -lz
(cd .; rm -f libmysqlpp.so libmysqlpp.so.2; ln -s libmysqlpp.so.2.3.2
libmysqlpp.so.2; ln -s libmysqlpp.so.2 libmysqlpp.so)
/export/whale/PS_code/PS_code/external_code/mysql++/mysql++-2.3.2/bk-deps g++ -c
-o util_util.o -Ilib      -I/usr/include/mysql -g -O2 ./examples/util.cpp
rm -f libmysqlpp_util.a
ar rcu libmysqlpp_util.a util_util.o
ranlib libmysqlpp_util.a
/export/whale/PS_code/PS_code/external_code/mysql++/mysql++-2.3.2/bk-deps g++ -c
-o resetdb_resetdb.o -Ilib      -I/usr/include/mysql -g -O2 ./examples/resetdb.cpp
g++ -o resetdb resetdb_resetdb.o -L/usr/lib64   -L.    -lz  -lmysqlpp_util
-lmysqlclient -lmysqlpp -lz
resetdb_resetdb.o: In function `main':
./examples/resetdb.cpp:59: undefined reference to `mysqlpp::get_library_version()'
./examples/resetdb.cpp:65: undefined reference to `mysqlpp::get_library_version()'
./libmysqlpp_util.a(util_util.o): In function
`mysqlpp::Result::operator=(mysqlpp::Result const&)':
lib/result.h:343: undefined reference to
`mysqlpp::ResUse::operator=(mysqlpp::ResUse const&)'
./libmysqlpp_util.a(util_util.o): In function `long long
mysqlpp::ColData_Tmpl<mysqlpp::const_string>::conv<long long>(long long)
const':
lib/coldata.h:365: undefined reference to
`mysqlpp::strip_all_blanks(std::basic_string<char, std::char_traits<char>,
std::allocator<char> >&)'
./libmysqlpp_util.a(util_util.o): In function `double
mysqlpp::ColData_Tmpl<mysqlpp::const_string>::conv<double>(double) const':
lib/coldata.h:365: undefined reference to
`mysqlpp::strip_all_blanks(std::basic_string<char, std::char_traits<char>,
std::allocator<char> >&)'
collect2: ld returned 1 exit status
make: *** [resetdb] Error 1

Thread
Problem compiling the examples...joh3@lithophile.com30 Aug
  • Re: Problem compiling the examples...Warren Young31 Aug