[odb-users] compilation error

Boris Kolpackov boris at codesynthesis.com
Mon Sep 4 13:47:18 EDT 2017


Сергей Никонов <shprotello at mail.ru> writes:

> This ODB command line is the same for all input files:
> 
> [...]

I just tried this with the current development branch and didn't get
any errors. Can you try the latest pre-release and see if it makes
any difference:

http://codesynthesis.com/~boris/tmp/odb/pre-release/b.3/

 
> Actually, I have one more question regarding view definition. When I put
> a view definition into a header with related classes everything is OK.
> But, when I try to move it to a separate file a strange compilation
> error persists. I've attached the file with view definition, ODB
> command line for it the same.
>
> #pragma db view object(item)
> struct item_view 
> {
>   std::shared_ptr<item> i;
> };

Your item class is in the ns1 namespace so it needs to be qualified as
ns1::item (in both places). With this fix everything compiles fine for
me.

Boris



More information about the odb-users mailing list