[odb-users] Incompatible ODB compiler and runtime version

Durkan, Peter PDurkan at cantor.com
Fri Feb 15 08:30:26 EST 2013


Hi Boris,

Yes - this is exactly what happened. I had an older version installed that it was picking up. All looks good now!

Thanks!
Peter

-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com] 
Sent: Friday, February 15, 2013 2:49 AM
To: Durkan, Peter
Cc: odb-users at codesynthesis.com
Subject: Re: [odb-users] Incompatible ODB compiler and runtime version

Hi Peter,

Durkan, Peter <PDurkan at cantor.com> writes:

> I just updated to the latest version and am not getting errors as in 
> the subject when trying to build my project -
> 
> "<standard-odb-prologue>:4:4: error: #error incompatible ODB compiler and runtime versions"

This means that the ODB compiler somehow picks up an older/newer version
of libodb. The best way to diagnose this problem is to run the ODB compiler
with the -v option. This will trigger a lot of extra information being
printed by the ODB compiler, but what we are interested in is the include
search paths and their order. Specifically, look for a block of lines
around the line that reads "#include "..." search starts here:".

For example, if I run this on my box:

$ odb -v -d mysql test.hxx

The chunk of lines that we are interested in looks like this:

ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/4.6
 /usr/include/c++/4.6/x86_64-linux-gnu/.
 /usr/include/c++/4.6/backward
 /usr/lib/gcc/x86_64-linux-gnu/4.6/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/4.6/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.

First, if you have any "ignoring nonexistent directory" lines, make
sure none of the directories mentioned are where you think up-to-date
libodb is installed. For example, you might have specified the libodb
directory with -I but misspelled it.

Next, examine all the directories after the "#include <...> search starts
here" line in order (this is the order in which ODB will examine them).
Look for the odb/version.hxx file in each. Once found, open it and check
the ODB_VERSION_STR macro. It should be the same as the first two components
(major and minor) of the ODB compiler version as printed with odb --version.

For example, in my case, odb/version.hxx is found in /usr/local/include
and its ODB_VERSION_STR is "2.2", which matches the 2.2.0 ODB compiler
version.

Let us know how it goes.

Boris
CONFIDENTIAL: This e-mail, including its contents and attachments, if any, are confidential. If you are not the named recipient please notify the sender and immediately delete it. You may not disseminate, distribute, or forward this e-mail message or disclose its contents to anybody else. Copyright and any other intellectual property rights in its contents are the sole property of Cantor Fitzgerald.
     E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission.  If verification is required please request a hard-copy version.
     Although we routinely screen for viruses, addressees should check this e-mail and any attachments for viruses. We make no representation or warranty as to the absence of viruses in this e-mail or any attachments. Please note that to ensure regulatory compliance and for the protection of our customers and business, we may monitor and read e-mails sent to and from our server(s). 

For further important information, please see  http://www.cantor.com/legal/statement




More information about the odb-users mailing list