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

WA van Doesburg wvandoesburg at gmail.com
Tue Sep 2 16:25:12 EDT 2014


Hello Boris,

Thank you for your replying to my question.

I’ve checked the generated code. The function signature is indeed

static bool
create_schema (...)

My platform is Ubuntu 12.04 and my compiler version is:
c++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

— Willem

On 01 Sep 2014, at 08:47, Boris Kolpackov <boris at codesynthesis.com> wrote:

> Hi Willem,
> 
> WA van Doesburg <wvandoesburg at gmail.com> writes:
> 
>> When linking my program I’m getting the error:
>> error: redefinition of ‘bool odb::create_schema
>> the compiler is citing two different -odb.cxx files both defining this
>> function.
> 
> create_schema() function is generated by ODB as static which means it
> should be local to the translation unit (.cxx file). Can you verify
> that they are indeed static? That is, the signature should be:
> 
> static bool
> create_schema (...)
> 
> If they are, then it would appear that your C++ compiler is ignoring
> static for some reason. Which C++ compiler/platform are you using?
> 
> It could also be something silly, like defining a pre-processor
> macro named 'static'.
> 
> Boris




More information about the odb-users mailing list