[odb-users] error: redefinition of ‘bool odb::create_schema

Timo Rothenpieler timo at rothenpieler.org
Wed Sep 3 11:49:50 EDT 2014


> Hi Boris,
> 
> I’m a little further along in pinpointing what is causing this.
> 
> I’m using cmake as my build system. In order to only have to change my code and not my CMakeList.txt each time I add a persistable class I’m including the generated -odb.cxx files to my own .cxx files where I’m using that class.
> 
> Apparently this produces the name clash.
> 
> So the my question is why is this producing the name clash? And, is there a way to automatically update my CMakeList.txt based on the output of my ODB build step?
> 
> If desired I can prepare a sample test case.

How do you integrate odb with cmake?
The find and use module i made automaticaly add the generated cpp files
to a sources list variable of your choice, so you only have to maintain
a list of headers odb has to run on.

See https://github.com/BtbN/OdbCmake for an example and the module.



Timo



More information about the odb-users mailing list