[odb-users] Linker errors with self-compiled libodb-oracle +
official Ubuntu (17.10) packages
fabian.fritz90 at gmail.com
Sat Apr 21 12:36:17 EDT 2018
You're right, I only had the order of the libraries wrong. Thanks.
2018-04-21 15:39 GMT+02:00 Boris Kolpackov <boris at codesynthesis.com>:
> 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.
More information about the odb-users