You’re probably not linking to the MySQL client library (libmysqlclient.* on Unixy systems, libmysql.lib on Windows). You have to do that as well as link to the MySQL++ library. Study the examples’ Makefiles or project files (as appropriate for your platform) to see how this is done.
Visual C++: An additional requirement with Visual C++ is that you must link to the same C Run-Time Library (RTL) for all modules throughout your project. As of MySQL++ 1.7.16, the library is built using the multithread DLL version of the C RTL. If you link MySQL++ to a program or additional third party library that uses a different RTL, you will get link errors. Again, study the example projects’ settings to see how this is done.[/quote]
From the MySQL++ FAQ. I don’t know if you’ve seen this or not, but it’s probably worth looking into.
No I have not been able to solve it, I have just reverted to using the standard/native mysql libraries. That works well for me, it is as easy to use as the mysql++, it is however more c like than c++, but it works.
Are you absolutely sure your project uses Multithreaded Debug DLL? There’s also a Multithreaded Debug option (with no DLL). I tried it with that, and I got a little farther in the build. After that I had to tell it to ignore the default msvcrtd.lib library, and that resulted in a successful build that was able to connect to a database.
Mine compiles with Juce and mysql++ libraries quite happily without ignoring any libraries. Run Time libraries (for debug) set to use Multithreaded Debug. Works fine without the DLL ones.
yep, you have to rebuild mysql++ library with only multithreaded without the dll, this will build the new runtime library files as well as a new dll that needs to reside with your exe, working ok now
By default, juce uses the non-dll libs, but I guess you could rebuild it to use the same ones as mysql - I guess it’s just a case of choosing whether it’s less hassle to rebuild juce or mysql.