[odb-users] Linking problem at Ubuntu 16.04

Sean Clarke sean.clarke at sec-consulting.co.uk
Tue May 31 02:46:41 EDT 2016


Just to check I have updated my CMake file to not include my projects
compiled ODB shared objects and use the system compiled libodb and
libodb-pgsql and I get similar failures as the original poster (I also
spotted an ABI reference):


[ 91%] Linking CXX executable bin/MyApp
CMakeFiles/MyApp.dir/web_services/SomeWebService.cpp.o: In function `void
__gnu_cxx::new_allocator<odb::pgsql::database>::construct<odb::pgsql::database,
char const (&) [19], char const (&) [19], char const (&) [19], char const
(&) [29]>(odb::pgsql::database*, char const (&) [19], char const (&) [19],
char const (&) [19], char const (&) [29])':
/usr/include/c++/5/ext/new_allocator.h:120: undefined reference to `
odb::pgsql::database::database(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, std::__cxx11:
:basic_string<char, std::char_traits<char>, std::allocator<char> > const&,
std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, unsigned int, std::
__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >
const&, odb::details::transfer_ptr<odb::pgsql::connection_factory>)'
lib/libMyAppDbLib.so: undefined reference to
`odb::pgsql::select_statement::free_result()'
lib/libMyAppDbLib.so: undefined reference to
`odb::pgsql::select_statement::load()'
lib/libMyAppDbLib.so: undefined reference to `typeinfo for
odb::object_not_persistent'
lib/libMyAppDbLib.so: undefined reference to
`odb::pgsql::object_statements_base::~object_statements_base()'
lib/libMyAppDbLib.so: undefined reference to `odb::transaction::commit()'
lib/libMyAppDbLib.so: undefined reference to
`odb::pgsql::select_statement::select_statement(odb::pgsql::connection&,
std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool, bool, unsigned
int const*, unsigned long, odb::pgsql::native_binding&,
odb::pgsql::binding&)'
lib/libMyAppDbLib.so: undefined reference to
`odb::pgsql::select_statement::reload()'
lib/libMyAppDbLib.so: undefined reference to
`odb::pgsql::delete_statement::delete_statement(odb::pgsql::connection&,
std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> > const&, std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, unsigned int const*,
unsigned long, odb::pgsql::native_binding&)'
lib/libMyAppDbLib.so: undefined reference to `typeinfo for odb::null_pointer
'
lib/libMyAppDbLib.so: undefined reference to
`odb::pgsql::operator||(odb::pgsql::query_base const&,
odb::pgsql::query_base const&)'
lib/libMyAppDbLib.so: undefined reference to
`odb::pgsql::select_statement::next()'
lib/libMyAppDbLib.so: undefined reference to `
odb::pgsql::select_statement::execute()'
lib/libMyAppDbLib.so: undefined reference to `vtable for
odb::object_not_persistent'
lib/libMyAppDbLib.so: undefined reference to
`odb::pgsql::insert_statement::execute()'
lib/libMyAppDbLib.so: undefined reference to `
odb::pgsql::transaction::current()'
lib/libMyAppDbLib.so: undefined reference to `vtable for
odb::session::object_map_base'
lib/libMyAppDbLib.so: undefined reference to
`odb::pgsql::insert_statement::insert_statement(odb::pgsql::connection&,
char const*, char const*, bool, unsigned int const*, unsigned long,
odb::pgsql::binding&, odb::pgsql::native_binding&, odb::pgsql::binding*,
bool)'
lib/libMyAppDbLib.so: undefined reference to `typeinfo for
odb::session::object_map_base'
lib/libMyAppDbLib.so: undefined reference to
`odb::details::shared_base::_dec_ref_callback()'
lib/libMyAppDbLib.so: undefined reference to `vtable for
odb::pgsql::query_param'
lib/libMyAppDbLib.so: undefined reference to `vtable for odb::null_pointer'
lib/libMyAppDbLib.so: undefined reference to `typeinfo for odb::result_impl'
lib/libMyAppDbLib.so: undefined reference to
`odb::pgsql::query_base::append(odb::details::shared_ptr<odb::pgsql::query_param>,
char const*)'
lib/libMyAppDbLib.so: undefined reference to `
odb::session::current_pointer()'
lib/libMyAppDbLib.so: undefined reference to
`odb::details::basic_buffer_base::capacity(unsigned long, unsigned long)'
lib/libMyAppDbLib.so: undefined reference to `odb::details::shared'
lib/libMyAppDbLib.so: undefined reference to
`odb::pgsql::delete_statement::delete_statement(odb::pgsql::connection&,
char const*, char const*, unsigned int const*, unsigned long,
odb::pgsql::binding&, odb::pgsql::native_binding&, bool)'
lib/libMyAppDbLib.so: undefined reference to
`odb::pgsql::delete_statement::execute()'
lib/libMyAppDbLib.so: undefined reference to
`odb::pgsql::query_base::append(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
lib/libMyAppDbLib.so: undefined reference to `
odb::pgsql::statement::deallocate()'
lib/libMyAppDbLib.so: undefined reference to
`odb::transaction::reset(odb::transaction_impl*, bool)'
lib/libMyAppDbLib.so: undefined reference to
`odb::pgsql::delete_statement::~delete_statement()'
lib/libMyAppDbLib.so: undefined reference to `
odb::pgsql::query_param::~query_param()'
lib/libMyAppDbLib.so: undefined reference to
`odb::pgsql::query_base::clause[abi:cxx11]() const'
lib/libMyAppDbLib.so: undefined reference to
`odb::pgsql::operator&&(odb::pgsql::query_base
const&, odb::pgsql::query_base const&)'
lib/libMyAppDbLib.so: undefined reference to `typeinfo for
odb::pgsql::query_param'
lib/libMyAppDbLib.so: undefined reference to
`odb::pgsql::update_statement::update_statement(odb::pgsql::connection&,
char const*, char const*, bool, unsigned int const*, unsigned long,
odb::pgsql::binding&, odb::pgsql::native_binding&, bool)'
lib/libMyAppDbLib.so: undefined reference to
`odb::session::object_map_base::~object_map_base()'
lib/libMyAppDbLib.so: undefined reference to `
odb::result_impl::result_impl(odb::connection&)'
lib/libMyAppDbLib.so: undefined reference to
`odb::pgsql::select_statement::select_statement(odb::pgsql::connection&,
char const*, char const*, bool, bool, unsigned int const*, unsigned long,
odb::pgsql::binding&, odb::pgsql::native_binding&, odb::pgsql::binding&,
bool)'
lib/libMyAppDbLib.so: undefined reference to
`odb::pgsql::query_base::query_base(odb::pgsql::query_base
const&)'
lib/libMyAppDbLib.so: undefined reference to `
odb::transaction::~transaction()'
lib/libMyAppDbLib.so: undefined reference to
`odb::pgsql::query_base::append(char const*, char const*)'
lib/libMyAppDbLib.so: undefined reference to `typeinfo for
odb::pgsql::object_statements_base'
lib/libMyAppDbLib.so: undefined reference to `
odb::pgsql::default_value_traits<std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >,
(odb::pgsql::database_type_id)10>::set_image(odb::details::basic_buffer<char>&,
unsigned long&, bool&, std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
lib/libMyAppDbLib.so: undefined reference to `typeinfo for
odb::object_already_persistent'
lib/libMyAppDbLib.so: undefined reference to `vtable for
odb::pgsql::object_statements_base'
lib/libMyAppDbLib.so: undefined reference to `vtable for
odb::object_already_persistent'
lib/libMyAppDbLib.so: undefined reference to
`odb::result_impl::~result_impl()'
lib/libMyAppDbLib.so: undefined reference to
`odb::pgsql::update_statement::execute()'
lib/libMyAppDbLib.so: undefined reference to `
odb::pgsql::details::endian_traits::host_endian'
lib/libMyAppDbLib.so: undefined reference to `vtable for
odb::pgsql::statements_base'
lib/libMyAppDbLib.so: undefined reference to
`odb::pgsql::query_base::init_parameters()
const'




Regards
Sean Clarke


More information about the odb-users mailing list