Re: Error: undefined reference to get_driver_instance
I had this problem myself and it did indeed turn out to be a linker problem.
The function in question appears to be in a shared library, in my case /usr/local/lib/libmysqlcppconn.so.
So you would have to link this shared library with your code to make everything work.
I also had an issue where /usr/local/lib wasn't among the search paths for libraries so when i tried to run my successfully linked program i would get a new errormessage "/usr/bin/ld: cannot find -lobjc/usr/local/lib/libmysqlcppconn.so".
The solution to this problem is to add '/usr/local/lib' (without quotes) to the file /etc/ld.so.conf, and then run ldconfig to make sure the new setting is applied.
Subject
Views
Written By
Posted
26166
June 03, 2009 09:27AM
19644
June 28, 2009 12:40AM
11931
July 03, 2009 03:18PM
10176
September 17, 2009 10:12AM
10746
September 22, 2009 03:36AM
Re: Error: undefined reference to get_driver_instance
11932
September 23, 2009 08:01AM
11472
September 23, 2009 04:51PM
7078
September 25, 2009 03:52PM
9524
January 15, 2010 05:34AM
6549
February 10, 2010 09:54AM
6672
April 22, 2010 03:01PM
8117
November 17, 2009 06:17AM
15275
February 09, 2010 05:51AM
8010
April 23, 2010 06:15PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.