Hi there, I am been trying to add an mySQL connector to my c++ project.
whole thing is coded in vi, compiled using g++ through a make file.
compiling the out file using:
g++ -c data/SQLConnector.cpp -I/usr/include/mysql -I/root/lib/mysql-connector/include/cppconn
Returns no error, however during the final output compile:
g++ -o Zenlink ZenBooter.o SQLConnector.o -L/usr/lib64/mysql -L/root/lib/mysql-connector/lib -lmysqlclient_r -lmysqlcppconn
I get the following error:
SQLConnector.o: In function `SQLConnector::connectToDB()':
SQLConnector.cpp:(.text+0x1a2): undefined reference to `get_driver_instance'
I am running on Centos5 64bit, g++, downloaded binary version of mysqlConnector/C++ from this site copied it to /root/lib/mysql/connector
I've been trying to figure out this problem for the last 2 days without any luck so far. Thanks in advance for any tips or help provided.
whole thing is coded in vi, compiled using g++ through a make file.
compiling the out file using:
g++ -c data/SQLConnector.cpp -I/usr/include/mysql -I/root/lib/mysql-connector/include/cppconn
Returns no error, however during the final output compile:
g++ -o Zenlink ZenBooter.o SQLConnector.o -L/usr/lib64/mysql -L/root/lib/mysql-connector/lib -lmysqlclient_r -lmysqlcppconn
I get the following error:
SQLConnector.o: In function `SQLConnector::connectToDB()':
SQLConnector.cpp:(.text+0x1a2): undefined reference to `get_driver_instance'
I am running on Centos5 64bit, g++, downloaded binary version of mysqlConnector/C++ from this site copied it to /root/lib/mysql/connector
I've been trying to figure out this problem for the last 2 days without any luck so far. Thanks in advance for any tips or help provided.