[odb-users] Intermittent problems building solution

Adam Walters adam at navigatesurgical.com
Thu Jul 18 02:11:09 EDT 2013


Hi Boris,
I double-checked and all of the #includes were present in my original code. I did a revert to a previous version that worked and everything was good. Tonight, I made some minor changes to the abstract base class from which the errant class derives and the problem reappeared. Further examination showed it to be caused by a missing override in the derived class (this would normally cause a 'can't instantiate abstract class' error message). The ODB compile doesn't complain that the derived class doesn't implement all of the abstract base class methods; instead, I get the rather cryptic errors I posted originally. Adding the override to the derived class fixes the problem.
At least I know what causes it now. Hopefully this will be of use to others who encounter the same problem.

Cheers,
Adam
________________________________________
From: Boris Kolpackov <boris at codesynthesis.com>
Sent: July-15-13 4:14 AM
To: Adam Walters
Cc: odb-users at codesynthesis.com
Subject: Re: [odb-users] Intermittent problems building solution

Hi Adam,

Adam Walters <adam at navigatesurgical.com> writes:

> The code that actually produces the errors is where I try to query
> it and actually when  I typedef the query object:
>
>         typedef odb::query<Case> query;
>
> This produces the following errors in Visual Studio 2012:
>
> error C2039: 'base_type' : is not a member of 'odb::query_selector<T,DB>'
> error C2065: 'base_type' : undeclared identifier
> error C2146: syntax error : missing ',' before identifier 'base_type'
> error C2504: 'odb::query_selector_impl<T,DB,kind>' : base class undefined

This usually happens when you forget to #include the ODB-generated header
file (case-odb.hxx in your case).

Boris



More information about the odb-users mailing list