I downloaded the connector for c++ and installed it following the steps provided on the website. Every step was succeed. But when I changed to path of example and compiled a program, none could compile successfully. The error was mainly about "undefined reference to `sql::mysql::get_driver_instance()'" and "fatal error: driver/mysql_public_iface.h: No such file or directory". Of course, I had used the command "export ..." . My compile-command was"g++ -o connect -I/usr/local/include -I/usr/local/include/cppconn -Wl, -Bdynamic -lmysqlcppconn connect.cpp". Why there were errors. Anyone can help me. Thank you.
↧