[odb-users] Intermittent problems building solution
Adam Walters
adam at navigatesurgical.com
Sun Jul 14 19:05:28 EDT 2013
Hi there,
I am experiencing an intermittent problem building an ODB-based solution in VS 2012. The application built and ran successfully previously but now produces build errors for the following code:
case.hxx
#include <string>
#include <memory>
#include <odb/core.hxx>
#pragma db object
class Case
{
public:
const int getCaseId() const { return _caseId;}
private:
Case() {}
friend class odb::access;
int _caseId;
};
#pragma db member(Case::_caseId) id auto
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
The command line I am using to process the hxx file is
odb --std c++11 -I ../Include -d mysql --generate-query --generate-schema case.hxx
This happened previously and after some fiddling, mysteriously started working. I don't know what I did then and now it has come back again. Any suggestions as to what I am doing wrong here?
Cheers,
Adam
More information about the odb-users
mailing list