From af8160be3fa83253cea2cb93e5c171c2c5d61a5d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 4 Feb 2011 09:27:20 +0200 Subject: Check runtime/compiler version compatibility during ODB compilation --- odb/odb.cxx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/odb/odb.cxx b/odb/odb.cxx index d4d719d..196329b 100644 --- a/odb/odb.cxx +++ b/odb/odb.cxx @@ -536,7 +536,16 @@ main (int argc, char* argv[]) // Add the standard prologue. // - // os << "#line 1 \"\"" << endl; + os << "#line 1 \"\"" << endl; + + // Make sure ODB compiler and libodb versions are compatible. + // + os << "#include " << endl + << endl + << "#if ODB_VERSION != " << ODB_VERSION << endl + << "# error incompatible ODB compiler and runtime versions" << endl + << "#endif" << endl + << endl; // Add custom prologue if any. // -- cgit v1.1