我正在尝试编译postgres C ++驱动程序libpqxx 6 repo here的示例代码。我一直收到错误(如下所示)。任何人都知道如何解决?
g++ -std=c++11 -I /usr/local/include/pqxx/ -L /usr/local/lib/ -I
/usr/local/pgsql/include/ -L
/usr/local/pgsql/lib/ postgres.cpp -lpqxx -lpq
In file included from /usr/include/c++/5/functional:55:0,
from /usr/include/c++/5/memory:79,
from /usr/local/include/pqxx/binarystring.hxx:17,
from /usr/local/include/pqxx/binarystring:10,
from /usr/local/include/pqxx/pqxx:10,
from postgres.cpp:2:
/usr/include/c++/5/tuple:991:33: error: ‘array’ was not declared in this scope
struct __is_tuple_like_impl<array<_Tp, _Nm>> : true_type
^
/usr/include/c++/5/tuple:991:44: error: wrong number of template arguments (2, should be 1)
struct __is_tuple_like_impl<array<_Tp, _Nm>> : true_type
^
/usr/include/c++/5/tuple:979:12: note: provided for ‘template<class>
struct std::__is_tuple_like_impl’
struct __is_tuple_like_impl : false_type
^
/usr/include/c++/5/tuple:991:47: error: expected unqualified-id before ‘>’ token
struct __is_tuple_like_impl<array<_Tp, _Nm>> : true_type
^
Makefile:4: recipe for target 'postgres' failed
make: *** [postgres] Error 1