undefined reference to 'get_driver_instance'

前端 未结 2 475
迷失自我
迷失自我 2020-12-18 11:50

I\'m getting \"undefined reference to \'get_driver_instance\'\" when building even the most simple example from: http://dev.mysql.com/doc/refman/5.1/en/connector-cpp-example

2条回答
  •  一个人的身影
    2020-12-18 11:51

    try to add '-lmysqlclient' to the command, i.e.: g++ -o test -Iinclude -Llib -L/usr/lib64/mysql -lmysqlclient main.cpp

提交回复
热议问题