[odb-users] time stamp problem

John Elemans john at navigatesurgical.com
Fri Aug 23 18:00:00 EDT 2013


I have an odb object with a timestamp field specified as follows;

     #pragma db type("TIMESTAMP") column ("modified") not_null readonly
     boost::posix_time::ptime                    _modified;

     std::unique_ptr<Account>                    _userId;

When I compile this I get several link errors. one example;

Error    3    error LNK2001: unresolved external symbol "public: __cdecl odb::boost::exception::exception(struct odb::boost::exception const &)" (??0exception at boost@odb@@QEAA at AEBU012@@Z)    C:\Users\john\Documents\programming\Seymour\Main Branch\ImageServer2\ImageServer2\DataServices.lib(PatientCase-odb.obj)

If I leave the -p boost/date-time out of the odb compile then I get;

Error    1    error C2440: '<function-style-cast>' : cannot convert from 'const st_mysql_time' to 'boost::posix_time::ptime'    C:\Users\john\Documents\programming\Seymour\ODB\ODB MySQL\libodb-mysql-2.2.0\odb\mysql\traits.hxx    317

I'm stumped! Suggestions appreciated!

John Elemans

More information about the odb-users mailing list