[odb-users] query::Age --> Incomplete type is not alowed

Boris Kolpackov boris at codesynthesis.com
Fri Apr 26 03:56:11 EDT 2013

Tarik BENZ <tenchu.tarik at hotmail.fr> writes:

> So I think query support should be enabled

Ok, the issue is actually simpler than that: you forgot to include

#include "User.hxx"
#include "User-odb.hxx"

The other two things that you may want to do:

1. Add include guards to User.hxx and Role.hxx, for example:

#ifndef USER_HXX
#define USER_HXX



2. Seeing that you are using std::shared_ptr in relationships, you will
   need to make it the object pointer. The easiest way to do this is to
   make it the default object pointer:

--default-pointer std::shared_ptr


More information about the odb-users mailing list