[odb-users] Compile Problem with odd and mysql

Boris Kolpackov boris at codesynthesis.com
Wed Oct 16 10:59:20 EDT 2019

Tschoche.Jonas at ddv-mediengruppe.de <Tschoche.Jonas at ddv-mediengruppe.de> writes:

> Hello,
> i have a problem with odb. I compiled all components with build2 on MacOS Mojave
> (odb, libodb, libodb-mysql, libodb-sqlite, libodb-boost, …).
> I tried to compile an example with odb with following command:
> odb -d mysql --generate-query --generate-schema --schema-format embedded --std c++11 --output-dir /Users /DEV/Examples/OdbCmake/cmake-build-debug/odb_gen --hxx-suffix .h --ixx-suffix _inline.h --cxx-suffix .cpp --odb-file-suffix _odb -I/usr/local/include -I/usr/local/Cellar/mysql-connector-c/6.1.11/include -I/usr/local/include/odb/mysql person.h
> It working, but when I compile the project with CMAKE (example from github: https://github.com/BtbN/OdbCmake/) then I get a compile error:
> In file included from /Users/DEV/Examples/OdbCmake/cmake-build-debug/odb_gen/person_odb.cpp:9:
> In file included from /Users/DEV/Examples/OdbCmake/cmake-build-debug/odb_gen/person_odb.h:107:

> /usr/local/include/odb/mysql/binding.hxx:28:16: error: unknown type name 'MYSQL_BIND'; did you mean 'MYSQL_TIME'?
>       binding (MYSQL_BIND* b, std::size_t n)

Yes, this is a know issue that has been fixed and will be published to
cppget.org with the next release of build2.

In the meantime, you can either get everything from stage:


Or follow this instructions to fix-up things from cppget.org:


More information about the odb-users mailing list