[odb-users] MSVC Compiler Error C2872 when comipling a project
using ODB with a polymorphic heirarchy
Jordan J. Neuhart
jneuhart at tlirr.com
Tue Jun 11 17:51:55 EDT 2013
Greetings Boris and all,
I am working on a test project using ODB with Qt and I keep getting a
compiler error which seems to be related to ODB. The set of compiler
error output is:
************************************************************************
***************************************************
C:\Users\jjn\Documents\SourceCode\NewSalesDesign\sales_and_design\odb\li
bodb\odb\polymorphic-info.hxx:63: error: C2872: 'database' : ambiguous
symbol
could be
'C:\Users\jjn\Documents\SourceCode\NewSalesDesign\sales_and_design\odb\l
ibodb\odb\database.hxx:37: odb::database'
or
'C:\Users\jjn\Documents\SourceCode\NewSalesDesign\sales_and_design\odb\l
ibodb-sqlite\odb\sqlite\database.hxx:36: odb::sqlite::database'
C:\Users\jjn\Documents\SourceCode\NewSalesDesign\sales_and_design\odb\li
bodb\odb\polymorphic-map.hxx:30: see reference to class template
instantiation 'odb::polymorphic_concrete_info<R>' being compiled
with
[
R=odb::access::object_traits<sales_design::Discount>::object_type
]
C:\Users\jjn\Documents\SourceCode\NewSalesDesign\sales_and_design\test\T
estTieredDiscount\discount-odb.cxx:223: see reference to class template
instantiation 'odb::polymorphic_map<R>' being compiled
with
[
R=odb::access::object_traits<sales_design::Discount>::object_type
]
C:\Users\jjn\Documents\SourceCode\NewSalesDesign\sales_and_design\odb\li
bodb\odb\polymorphic-info.hxx:65: error: C2872: 'database' : ambiguous
symbol
could be
'C:\Users\jjn\Documents\SourceCode\NewSalesDesign\sales_and_design\odb\l
ibodb\odb\database.hxx:37: odb::database'
or
'C:\Users\jjn\Documents\SourceCode\NewSalesDesign\sales_and_design\odb\l
ibodb-sqlite\odb\sqlite\database.hxx:36: odb::sqlite::database'
************************************************************************
***************************************************
It seems to be related to polymorphism somehow. I am wondering if the
issue is related to the fact that I have a base class which is both
polymorphic and abstract. This base class contains the Object Id and
the version number used for polymorphic conversion.
I am using Qt 5.0.2 with the 64 bit compiler that comes with Visual
Studio 2012 Express on Windows 7. I have successfully compiled another
test project that uses a polymorphic hierarchy without issue using the
same setup and libraries.
Thank you for any help that you may provide.
Jordan Neuhart
Database Administrator
Sofware Developer
T-L Irrigation Co.
P.O. Box 1047
151 East Hwy 6 & AB Road
Hastings, NE 68902-1047
office: 402-462-4128 ext. 264
800-330-4264 ext. 264
cell: 402-217-1377
email: jjn at tlirr.com <mailto:jjn at tlirr.com>
website: http://www.tlirr.com <http://www.tlirr.com/>
More information about the odb-users
mailing list