[odb-users] Error creating multi-database query support code with objects containing composite values in Visual Studio 2010/2013 (MSVC)

Boris Kolpackov boris at codesynthesis.com
Fri Jan 17 05:57:54 EST 2014


Hi Harald,

Ok, I've managed to fix this. I can build you a pre-release binary of
the ODB compiler if you would like to test the fix. Just let me know
which platform/architecture you are using.

For those interested in the gory details, here is some background on
the problem/fix from the git log:

    A composite value is represented in query_columns as a nested struct.
    Even though the query_columns template instantiation is exported, VC++
    for some reason doesn't appear to also export the nested structs. To
    work around this, nested structs have to have the export macro in the
    declaration. But that's not it: we also have to declare the nested
    structs extern, just like the outer template instantiation itself.

Boris



More information about the odb-users mailing list