I'm currently in the process of upgrading a C++ application make use of a PostgreSQL database. Since we are typically running on *nix based systems I'm currently working within the Windows Subsystem for Linux (WSL) and a Ubuntu distribution in particular. PostgreSQL 10 was install via apt-get
and everything was upgraded before following the directions to build libpqxx
on Unix-like systems.
As a very basic test I have a simple class that just includes the reference:
#include <pqxx/pqxx>
However, building results in a (long) error log starting with the following:
[ 15%] Building CXX object src/CMakeFiles/Core.dir/Reporters/DbReporter.cpp.o
In file included from /usr/local/include/pqxx/array.hxx:18:0,
from /usr/local/include/pqxx/array:4,
from /usr/local/include/pqxx/pqxx:2,
from /mnt/c/Users/User/git/Simulation/src/Reporters/DbReporter.cpp:3:
/usr/local/include/pqxx/internal/encodings.hxx:26:42: error: ‘pqxx::internal::encoding_group pqxx::internal::enc_group’ redeclared as different kind of symbol
encoding_group enc_group(std::string_view);
All of the errors that follow are of a similar nature with files under /pqxx/*.
generating the errors. Typically for invalid declarations, functions not being part of the std
namespace (which is not redefined in the application), or what appear to be syntax errors.
I suspect there is a mis-match between how the libpqxx
library was built. How can I isolate and correct the problem?