[odb-users] issue while working with MySQL database

Monika Idzik moni.idzik at gmail.com
Thu Sep 5 12:48:23 EDT 2019


Dear ODB users,

I have an issue with adding MySQL support into my odb project - I
previously used SQLite and had no problems at all, now I'm adding MySQL
option and getting a loong list of errors starting with this one in
odb_gen/*_odb .hpp and .cpp files:

/usr/local/include/odb/mysql/binding.hxx:28:26: error: expected ‘)’
before ‘*’ token       binding (MYSQL_BIND* b, std::size_t n)
                ^/usr/local/include/odb/mysql/binding.hxx:33:7: error:
‘MYSQL_BIND’ does not name a type; did you mean ‘MYSQL_TIME’?
MYSQL_BIND* bind;       ^~~~~~~~~~
MYSQL_TIME/usr/local/include/odb/mysql/binding.hxx: In constructor
‘odb::mysql::binding::binding()’:/usr/local/include/odb/mysql/binding.hxx:26:19:
error: class ‘odb::mysql::binding’ does not have any field named
‘bind’       binding (): bind (0), count (0), version (0) {}
        ^~~~/usr/local/include/mysql/mysql/client_plugin.h: At global
scope:<command-line>:0:7: error: expected identifier before numeric
constant<command-line>:0:7: error: expected unqualified-id before
numeric constant<command-line>:0:7: error: expected identifier before
numeric constant<command-line>:0:7: error: expected ‘,’ or ‘...’
before numeric constant

I assume I don't include some library...?

I have libodb-mysql installed, added mysql to -d option, included
<odb/mysql/database.hxx> where I create new odb::mysql::database... do I
miss something?

Thank you,
Monika


More information about the odb-users mailing list