[odb-users] Linker errors with self-compiled libodb-oracle +
official Ubuntu (17.10) packages
Boris Kolpackov
boris at codesynthesis.com
Sat Apr 21 09:39:23 EDT 2018
Fabian Fritz <fabian.fritz90 at gmail.com> writes:
> g++ -lodb-2.4 -lodb-oracle -o odbtest.run obj/test.o
> obj/test.o: In function `main':
> test.cpp:(.text+0x509): undefined reference to `odb::transaction::~transaction()'
> test.cpp:(.text+0x6cb): undefined reference to `odb::oracle::database::print_usage(std::ostream&)'
Have you built libodb-oracle as a static library? If so, then you need
to link the libraries after the object files:
g++ -o odbtest.run obj/test.o -lodb-2.4 -lodb-oracle
If that doesn't help, try to rebuild everything (libodb, libodb-oracle,
and your project) from source with the same g++ -- there has been a
breaking ABI change in GCC which renders libraries built with different
versions incompatible.
Boris
More information about the odb-users
mailing list