O. Baum wrote:
> HOWEVER, one will run into a huge linkage problem IF one compiles a
> DLL with /MT AND the DLL interface contains classes which are derived
> from C(++)-std-lib's classes (like std::string, std::ostream etc.).
> Exactly this is the case in MySQL++: The Query class is derived from
> std::ostream, which leads to linkage errors LNK2005 and LNK1169 when
> trying to link the MySQL++ DLL with the main program's EXE.
> (All links and works correctly if all is compiled with /MD.)
> Could anybody help me please?
I don't know of any easy answers. You could:
1. Change the parentage of Query and a whole lot of other classes (Row,
Fields, etc.) If you provided the patches, at best they would be
accepted no earlier than v4, which could be years away. More likely,
this would cause a development fork.
2. Switch to MinGW, which shouldn't have these limitations, but you'd
have to change GUI frameworks, too. If you don't have much code written
yet, this may be practical, but probably not otherwise.
3. Find some other C++ wrapper for MySQL.
4. Forget C++ wrappers, and use the underlying MySQL C API instead.