[odb-users] field 'extra_' has incomplete type 'odb::section'
不明真相
icewill9999 at vip.qq.com
Mon Jul 5 22:24:06 EDT 2021
Hi all,
I was trying to migrate my project from odb 2.4.0 to odb 2.5.0, when I use the odb compiler I got the error message:
odb -d mysql -q --std c++11 --default-pointer std::shared_ptr -p "boost/date-time" -I "E:\newsdbdev\include\boost\boost1630" -I "C:\odb\release\include" baseinfo.hxx
baseinfo.hxx:564:18: error: field 'extras_' has incomplete type 'odb::section'
564 | odb::section extras_;
| ^~~~~~~
In file included from C:\odb\release\include/odb/core.hxx:16,
from baseinfo.hxx:19:
C:\odb\release\include/odb/forward.hxx:38:9: note: forward declaration of 'class odb::section'
38 | class section;
the section is defined just as the ODB manual described , and it works fine in ODB 2.4.0.
const odb::section& extras_section() const { return extras_; }
odb::section& extras_section() { return extras_; }
const odb::nullable<buffer>& Img_data() const { return img_data_; }
void Img_data(odb::nullable<buffer> val) { img_data_=val; extras_.change(); }
#pragma db section(extras_)
odb::nullable<buffer> img_data_;
#pragma db load(lazy) update(change)
odb::section extras_;
I also checked the source code of 2.4 and 2.5, and found nothing different in this part. Can anybody help me on this? thanks a lot!
Regards,
Wang
More information about the odb-users
mailing list