[odb-users] Using ODB with C++-11

Marco Craveiro marco.craveiro at gmail.com
Fri Jan 18 09:53:55 EST 2013


I have installed cutl, ODB compiler, ODB runtime, postgres support and the
boost profile as per INSTALL instructions. I have used the source packages
for version 2.1.1. They have been built against GCC-4.7 - I ended up using
the default debian GCC as the apt-get seemed easy enough. I now have a
working odb that does not choke on C++-11. Many thanks for your help with

However, I'm now struggling with the following error:

odb --std c++11 -d pgsql --generate-query --generate-schema -I
-I /usr/local/pfh/include

error: unknown db pragma an_attribute

The pragmas on my code are these:

#pragma db object(class_1)
#pragma db member(class_1::an_attribute_) an_attribute

To the untrained eye, they look similar enough to the hello world tutorial:

#pragma db object(person)
#pragma db member(person::email_) id

Can you shed some light on what I'm doing wrong?

Thanks for your time

So young, and already so unknown -- Pauli

blog: http://mcraveiro.blogspot.com

More information about the odb-users mailing list