c++ undefined reference to mysqlinit

Solved

g++ $(mysql_config --cflags) file.cpp -o filename $(mysql_config --libs)

原文地址:https://www.cnblogs.com/ytjjyy/p/3474537.html