[odb-users] Error in compile

nima chavooshi nima0102 at gmail.com
Sat Sep 13 14:43:40 EDT 2014


Hi everybody,

This is my first email to this mailing list. I intend use ODB in my
project.(will be a open source network tools). So I am checking and writing
some test program. I could compile sample code without any issue. In the
structure of my code, I have 2 classes, person and contact(the attached).
The person class contains contact class as a member.
I did compile the header of classes with "odb" compile. but during
compiling of "person-odb.cxx" I have got the error below:
-----------------------------------------------------------
In file included from /usr/local/include/odb/database.hxx:499:0,
                 from /usr/local/include/odb/mysql/database.hxx:14,
                 from person-odb.cxx:14:
/usr/local/include/odb/database.ixx: In instantiation of 'typename
odb::object_traits<T>::pointer_type odb::database::find_(const typename
odb::object_traits<T>::id_type&) [with T = Contact; odb::database_id DB =
(odb::database_id)0u; typename odb::object_traits<T>::pointer_type =
Contact*; typename odb::object_traits<T>::id_type = long unsigned int]':
/usr/local/include/odb/database.txx:82:38:   required from 'typename
odb::object_traits<T>::pointer_type odb::database::load_(const typename
odb::object_traits<T>::id_type&) [with T = Contact; odb::database_id DB =
(odb::database_id)0u; typename odb::object_traits<T>::pointer_type =
Contact*; typename odb::object_traits<T>::id_type = long unsigned int]'
/usr/local/include/odb/mysql/database.ixx:100:36:   required from 'typename
odb::object_traits<T>::pointer_type odb::mysql::database::load(const
typename odb::object_traits<T>::id_type&) [with T = Contact; typename
odb::object_traits<T>::pointer_type = Contact*; typename
odb::object_traits<T>::id_type = long unsigned int]'
person-odb.cxx:381:42:   required from here
/usr/local/include/odb/database.ixx:570:54: error: no matching function for
call to 'odb::object_traits_impl<Contact,
(odb::database_id)0u>::find(odb::database&, const id_type&)'
/usr/local/include/odb/database.ixx:570:54: note: candidate is:
In file included from person-odb.hxx:18:0,
                 from person-odb.cxx:7:
contact-odb.hxx:247:5: note: static bool
odb::access::object_traits_impl<Contact,
(odb::database_id)0u>::find(odb::database&, const id_type&,
odb::access::object_traits<Contact>::object_type&)
contact-odb.hxx:247:5: note:   candidate expects 3 arguments, 2 provided
---------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: contact.h
Type: text/x-chdr
Size: 471 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/odb-users/attachments/20140913/16ee9bf7/contact.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: person.h
Type: text/x-chdr
Size: 536 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/odb-users/attachments/20140913/16ee9bf7/person.h


More information about the odb-users mailing list