Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6715747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:39:04+00:00 2026-05-26T08:39:04+00:00

I have a program that uses MySQL connector to talk to a MySQL database.

  • 0

I have a program that uses MySQL connector to talk to a MySQL database. The application runs fine using Visual Studio 2008. I’m trying to get the application to build with Visual Studio 2010 and that’s where the problems began.

The MySQL Connector 1.05 is not supported with VS 2010, and they don’t have a binary version of 1.1.0 that works with VS 2010. The MySQL information says to download the source for Connector C++ 1.10 and build with VS 2010. After much work, I build it. The examples run.

However, when I build my application with the newly built Connector C++ 1.1.0, I get the following error message:

error LNK2019: unresolved external symbol "class sql::mysql::MySQL_Driver * __cdecl sql::mysql::get_driver_instance(void)" (?get_driver_instance@mysql@sql@@YAPAVMySQL_Driver@12@XZ) referenced in function "private: void __thiscall Database_NS::Manager::initialize_db_driver(void)const " (?initialize_db_driver@Manager@Database_NS@@ABEXXZ)

This is caused by the following source line:

sql::Driver * p_driver = sql::mysql::get_driver_instance();

The MySQL Connector C++ 1.1.0 examples use the above line and they get no errors.
I’ve tried linking with mysqlconn-static.lib, mysqlconn.lib, mysqlclient.lib, libmysql.lib and still the error message persists.

An interesting point is that according to VS 2010, the above source line uses this declaration:

CPPCONN_PUBLIC_FUNC MySQL_Driver * get_driver_instance();

Note the different return values.

When I use Visual Studio 2010 and the connector project example, VS 2010 can’t find the declaration or function declaration of get_driver_instance() used by connect.cpp. The statement in my program is the exact statement used by connect.cpp, since I copied it over without any changes.

Other people have resolved this issue by using another driver. However, I don’t want to change my code that works with VS2008 unless I have to.

Another reply to this issue says to define “mysqlcppconn_EXPORTS”, but this didn’t work either, also reported in the comment to the reply.

Here are my questions:
1. Has anybody got MySQL Connector 1.1.0 to work with Visual Studio 2010?
If so, please reply with step by step example and indicate whether dll or static library.
2. How is the VS compiler selecting the get_driver_instance() function that returns MySQL_Driver * rather than the function that returns the Driver *?
I’m not even getting any warnings or errors about ambiguous functions (since overloading must differ by more than only return type).

I am using Visual Studio 2010 on Windows-7×64-bit, MySQL Connector C++ 1.1.0.

See also:
get_driver_instance() crashes with Qt
undefined reference to 'get_driver_instance'
MySQL C++ Connector: undefined reference to `get_driver_instance'
mysql-connector-c++ – ‘get_driver_instance’ is not a member of ‘sql::mysql’
How to fix unresolved external symbol due to MySql Connector C++?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:39:04+00:00Added an answer on May 26, 2026 at 8:39 am

    Some function names have changed. My best solution is to differentiate between them by using preprocessor conditionals.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a vb.net program that uses mysql as its database. And it works
I have a C# program that uses System.Data.OracleClient to access an oracle database. The
We have a program that uses QoS-sockets, our softphone application uses QoS for the
I have inherited an application that uses MySQL and that is used by a
I have a console-mode program that uses SQLite3 to maintain a database file. It
I have a program that uses a Microsoft Access database for its back-end. I
I have a C# application that uses a localhost DB (MySQL). Now, when I
I have a program that uses OpenGL combined with Cocoa and Python using PyObjC.
I have a program that uses the mt19937 random number generator from boost::random. I
I have a program that uses JAMA and need to test is a matrix

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.