[odb-users] Using ODB with C++-11
Marco Craveiro
marco.craveiro at gmail.com
Thu Jan 17 15:48:53 EST 2013
Hi odb-users,
We're trying to add support for ODB to our domain generator dogen [1].
Dogen basically takes UML diagrams in Dia [2] and generates C++-11 code
from them. I did a first attempt which generates code like so:
https://github.com/kitanda/dogen/blob/master/projects/class_without_package/include/dogen/class_without_package/odb/class_1_odb.hpp
https://github.com/kitanda/dogen/blob/master/projects/class_without_package/include/dogen/class_without_package/types/class_1.hpp
I obtained ODB from here [3] and unpacked it in /opt/odb. I then read [4]
(I'm doing a second, more thorough read in case my initial shallow read
failed).
I then tried to use ODB on the generated code I got the following errors:
$ /opt/odb/bin/odb --std c++11 -d pgsql --generate-query --generate-schema
-I
/home/marco/Development/kitanda/dogen/projects/class_without_package/include/
class_without_package/include/dogen/class_without_package/odb/class_1_odb.hpp
I got the following errors:
In file included from
class_without_package/include/dogen/class_without_package/odb/class_1_odb.hpp:28:0:
/home/marco/Development/kitanda/dogen/projects/class_without_package/include/dogen/class_without_package/types/class_1.hpp:34:15:
error: variable 'dogen::class_without_package::class_1
dogen::class_without_package::final' has initializer but incomplete type
/home/marco/Development/kitanda/dogen/projects/class_without_package/include/dogen/class_without_package/types/class_1.hpp:35:1:
error: expected primary-expression before 'public'
/home/marco/Development/kitanda/dogen/projects/class_without_package/include/dogen/class_without_package/types/class_1.hpp:35:1:
error: expected '}' before 'public'
/home/marco/Development/kitanda/dogen/projects/class_without_package/include/dogen/class_without_package/types/class_1.hpp:35:1:
error: expected ',' or ';' before 'public'
/home/marco/Development/kitanda/dogen/projects/class_without_package/include/dogen/class_without_package/types/class_1.hpp:37:20:
error: expected ')' before '&&' token
/home/marco/Development/kitanda/dogen/projects/class_without_package/include/dogen/class_without_package/types/class_1.hpp:38:16:
error: expected constructor, destructor, or type conversion before '=' token
<snip>
As a layman analysis it seems like I'm not getting ODB to C++ 11 mode for
some reason, but can't see what I'm doing wrong. Can someone point out any
glaring mistakes?
Thanks for your time
Marco
--
So young, and already so unknown -- Pauli
blog: http://mcraveiro.blogspot.com
[1] https://github.com/kitanda/dogen
[2] https://live.gnome.org/Dia
[3]
http://www.codesynthesis.com/download/odb/2.1/odb-2.1.1-x86_64-linux-gnu.tar.bz2
[4]
http://www.codesynthesis.com/~boris/blog/2012/03/27/cxx11-support-in-odb/
More information about the odb-users
mailing list