1.下载mysql++3.1.0.tar.gz
2.tar -zvxf mysql++3.1.0.tar.gz
3.sudo ./configure --prefix=/usr
4.sudo vim ./ssx/genv2.cpp 添加#include
5.sudo make
6.出现下个错误
In file included from ./lib/sql_buffer.h:31:0,
from ./lib/sql_buffer.cpp:26:
./lib/refcounted.h:258:2: 错误: ‘size_t’不是一个类型名
7. sudo vim ./lib/sql_buffer.h 添加#include
8.继续sudo make
9.出现下个错误
./ssx/parsev2.cpp:496: undefined reference to `mysqlpp::internal::str_to_lwr(std::basic_string
collect2: ld 返回 1
make: *** [test_ssqls2] 错误 1
此刻手动键入如下命令:
g++ -o test_ssqls2 test_ssqls2_ssqls2.o -lmysqlpp_ssqls2parse -WI,--as-needed -L. -L/usr/local/lib/mysql -lmysqlclient -lmysqlpp
10 继续sudo make
11 sudo make install