MySQL++

编译安装mysql++库

wget https://tangentsoft.com/mysqlpp/releases/mysql++-3.2.3.tar.gz
tar -zxvf mysql++-3.2.3.tar.gz

./configure --prefix=/usr/local --enable-thread-check
make
make install
/etc/ld.so.conf 添加 /usr/local/lib
/sbin/ldconfig
/bin/ln -s /usr/local/lib/libmysqlpp.so /usr/lib/libmysqlpp.so

程序编译

#include <iostream>
#include <mysql++.h>
using namespace mysqlpp;
using namespace std;
int main() {
	Connection conn(false);
	conn.connect("database", "host", "user", "password", port);
	Query query = conn.query("select * from table1");
}
-lmysqlpp

参考