[odb-users] Information

Boris Kolpackov boris at codesynthesis.com
Mon May 20 10:27:34 EDT 2013

Tarik BENZ <tenchu.tarik at hotmail.fr> writes:

> My IDE is visual studio 2012 and when I compile my project,
> first I have a lot of warnings :
>   1>warning C4068: unknown pragma

Section 12.8.2 in the manual describes various ways to get rid of
these warnings.

> and secondly, the compilation takes a while but the changes I've made 
> are insignificant!
> Is it because I am not using correctly the odb tool or is it normal?

If you change one of the headers that define persistent classes, then
they have to be recompiled with ODB and then the generated code has to
be recompiled with VC++. Depending on the size of your project, this
can take some time.

It is also a good idea to make sure that your dependencies are set up
correctly. One common sign that this is not the case is constant re-
builds even without any changes. So a good test for this is to try to
build the same project twice without making any changes in between. If
everything is setup correctly, then for the second build the IDE should
tell you that everything is up to date and not execute any commands.

Finally, one way to speed up generated code compilation is to add the 
precompiled header to the generated source files. You can use the
--cxx-prologue ODB compiler option to do this.


More information about the odb-users mailing list