[odb-users] Error when building examples.

Boris Kolpackov boris at codesynthesis.com
Mon Aug 7 09:56:11 EDT 2023


Anurag Gupta <anuragg at miltenyi.com> writes:

> I was able to install ODB 2.5.0 beta on my Ubuntu 22.04 with GCC 13.1.
> Now I'm trying to build the examples by following the instructions
> provided. I am able to configure the build to use "pgsql" but when
> I run make command it finishes with errors. Also, lots of warning
> about using std::auto_ptr. Please check the attached output of make.
>
> [...]
>
> g++ -DHAVE_CONFIG_H   -I'.' -I'.'   -DDATABASE_PGSQL     -g -O2 -D_REENTRANT  -MT driver.o -MD -MP -MF $depbase.Tpo -c -o driver.o driver.cxx

You are building examples from ODB 2.4.0 which invoke the ODB compiler
in the C++98 mode.

We haven't yet migrated examples to build2/C++11 so I think the best
option for now is to pick the `c++11` example and then build and run
it manually as described in the README that accompanies every example.

You should also be able to easily convert other examples to C++11 (or
later) by, in most cases, just replacing auto_ptr with unique_ptr and
passing `--std c++11` (or later) to the ODB compiler.



More information about the odb-users mailing list