c++ 操作postgres,用pqxx

一个例子:

https://github.com/Pr0Wolf29/libpqxx-example/blob/master/pqxx_example.cpp


安装pqxx:

wget http://pqxx.org/download/software/libpqxx/libpqxx-4.0.tar.gz
tar xvfz libpqxx-4.0.tar.gz
cd libpqxx-4.0
./configure
make
make install

安装后在qt中使用在pro中要加上,不然会编译错误:


LIBS += -L/usr/local/lib/ -lpqxx


猜你喜欢

转载自blog.csdn.net/hetongde/article/details/79458456