version.hxx 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /** Version info for libpqxx.
  2. *
  3. * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/version instead.
  4. *
  5. * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
  6. *
  7. * See COPYING for copyright license. If you did not receive a file called
  8. * COPYING with this source code, please notify the distributor of this mistake,
  9. * or contact the author.
  10. */
  11. #ifndef PQXX_H_VERSION
  12. #include "pqxx/compiler-public.hxx"
  13. #include "pqxx/compiler-internal-pre.hxx"
  14. /// Full libpqxx version string.
  15. #define PQXX_VERSION "6.4.4"
  16. /// Library ABI version.
  17. #define PQXX_ABI "6.4"
  18. /// Major version number.
  19. #define PQXX_VERSION_MAJOR 6
  20. /// Minor version number.
  21. #define PQXX_VERSION_MINOR 4
  22. namespace pqxx
  23. {
  24. namespace internal
  25. {
  26. /// Library version check stub.
  27. /** Helps detect version mismatches between libpqxx headers and the libpqxx
  28. * library binary.
  29. *
  30. * Sometimes users run into trouble linking their code against libpqxx because
  31. * they build their own libpqxx, but the system also has a different version
  32. * installed. The declarations in the headers against which they compile their
  33. * code will differ from the ones used to build the libpqxx version they're
  34. * using, leading to confusing link errors. The solution is to generate a link
  35. * error when the libpqxx binary is not the same version as the libpqxx headers
  36. * used to compile the code.
  37. *
  38. * This is a template declaration, but its only actual definition is a
  39. * sepcialisation for the current library version. The definition is in the
  40. * libpqxx binary, so it's based on the version as found in the binary. The
  41. * headers contain a call to the function, specialised on the libpqxx version
  42. * as found in the headers. (The library build process will use its own local
  43. * headers even if another version of the headers is installed on the system.)
  44. *
  45. * If the libpqxx binary was compiled for a different version than the user's
  46. * code, linking will fail with an error: @c check_library_version will not
  47. * exist for the given version number.
  48. */
  49. template<int, int> PQXX_LIBEXPORT int check_library_version() noexcept;
  50. }
  51. }
  52. #include "pqxx/compiler-internal-post.hxx"
  53. #endif