Hello mysql++ experts,
I have a Visual Studio Solution using mysql++ 2.3.2 and MySQL Server 5.1 which works fine
in Visual Studio 2008.
When I convert the solution to Visual Studio 2010, I get LNK1169/LNK2005 errors from
double defines like the following (from another project later in the build, mysql++ builds
"Error 6 error LNK2005: "public: void __thiscall std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> >::reserve(unsigned int)"
already defined in Utility.obj
In general when using .lib files in Visual Studio I try to have all projects and their
dependencies built with the same version of Visual Studio.
But the mysql++ project uses the C:\Program Files\MySQL\MySQL Server
5.1\Embedded\DLL\release\libmysqld.lib as a linker input.
I don't explicitly use basic_string anywhere, but there are lots of #include
<string> in my files.
My MySQL Server 5.1 installation is from the MySql AB windows msi file, so I don't know
what compiler it was built from, but I am pretty sure that it was not Visual Studio 2010.
Googling around, mixing versions of the Standard C++ Libraries is considered a very bad
So my question is, should I rebuild MySQL Server 5.1 from source in Visual Studio 2010
when converting mysql++ and related projects to Visual Studio 2010??
Or is the libmysqld.lib library generic enough that any Visual Studio version can safely
link to it??
I know that linking across compilers can cause issues because of different naming
conventions, etc., but my knowledge of the internals of the linking process is not
adequate to answer the questions above. So I am hoping someone on this list either knows
the answers or can help me answer them myself.
Thanks for your help,