配置mysql++库

//Manjaro

$ sudo pacman -S mysql++

$ touch main.cpp

$ vim main.cpp

 1 # include <iostream>
 2 # include <mysql++.h>
 3 
 4 using namespace std;
 5 
 6 int main()
 7 {
 8 cout << "Hello Mysql++ " << endl;
 9 getchar();
10 return 0;    
11 
12 }

$ g++ -o m main.cpp -I /usr/include/mysql++/ -I /usr/include/mysql -lmysqlpp

$ ./m

猜你喜欢

转载自www.cnblogs.com/bhgk/p/11839073.html