[odb-users] Linking problem at Ubuntu 16.04

Martin Schneider martin at mu-schneider.de
Sat May 28 10:23:05 EDT 2016


Hi,

I've switched to Ubuntu 16.04 and get some strange problems when linking 
my old odb programs.
After this I tried the examples from odb-tests-2.4.0 and get the same error.

Running following commands gives
 > ./configure --with-database=mysql
 > make
...
make[4]: Verzeichnis 
„/home/martin/projects/odb/odb-tests-2.4.0/common/access“ wird betreten
/bin/bash ../../libtool --tag=CXX   --mode=link g++  -g -O2 
-D_REENTRANT    -o driver driver.o test-odb.o 
../../libcommon/common/libcommon.la -lodb-mysql -lodb-qt -lodb-boost 
-lboost_date_time -lboost_system -lodb  -lpthread
libtool: link: g++ -g -O2 -D_REENTRANT -o .libs/driver driver.o 
test-odb.o  ../../libcommon/common/.libs/libcommon.so -lodb-mysql 
-lodb-qt -lodb-boost -lboost_date_time -lboost_system -lodb -lpthread
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libodb-mysql.so: 
undefined reference to `odb::statement::process_insert(char const*, void 
const* const*, unsigned long, unsigned long, char, 
std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> >&)'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libodb-mysql.so: 
undefined reference to `odb::statement::process_update(char const*, void 
const* const*, unsigned long, unsigned long, char, 
std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> >&)'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libodb-mysql.so: 
undefined reference to `odb::statement::process_select(char const*, void 
const* const*, unsigned long, unsigned long, char, char, bool, 
std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> >&, bool)'
collect2: error: ld returned 1 exit status
Makefile:343: die Regel für Ziel „driver“ scheiterte
...


Following odb libs are installed:
martin at pcmartin:~/projects/odb/odb-tests-2.4.0$ ll 
/usr/lib/x86_64-linux-gnu/libodb*
-rw-r--r-- 1 root root 142048 Mai 25  2015 libodb-2.4.so
-rw-r--r-- 1 root root 341234 Mai 25  2015 libodb.a
-rw-r--r-- 1 root root  10408 Mai 27  2015 libodb-boost-2.4.so
-rw-r--r-- 1 root root  12754 Mai 27  2015 libodb-boost.a
lrwxrwxrwx 1 root root     19 Mai 27  2015 libodb-boost.so -> 
libodb-boost-2.4.so
-rw-r--r-- 1 root root 171232 Apr  5 17:18 libodb-mysql-2.4.so
-rw-r--r-- 1 root root 374774 Apr  5 17:18 libodb-mysql.a
lrwxrwxrwx 1 root root     19 Apr  5 17:18 libodb-mysql.so -> 
libodb-mysql-2.4.so
-rw-r--r-- 1 root root  10408 Jul  5  2015 libodb-qt-2.4.so
-rw-r--r-- 1 root root  10318 Jul  5  2015 libodb-qt.a
lrwxrwxrwx 1 root root     16 Jul  5  2015 libodb-qt.so -> libodb-qt-2.4.so
lrwxrwxrwx 1 root root     13 Mai 25  2015 libodb.so -> libodb-2.4.so

installed by:
sudo apt-get install libodb-dev libodb-mysql-dev libodb-boost-dev 
libodb-qt-dev


Any idea where my mistake is?

Thanks
Martin



More information about the odb-users mailing list