Andre Sodermans wrote:
>
> 2) you *have* to select Multi-threaded Debug DLL (/MDd) in C/C++ -
> Code Generation - Runtime Library
> it won't let you link to a static runtime - why? don't ask me probably
> something to do with redistribution
The executable and all its DLLs have to be built with the same settings
when using C++, to avoid name mangling conflicts. MySQL++ falls out of
the box using /MD, so your program must, too.
We do it this way for two reasons:
1. It seems to be the most popular of the combinations available
2. MySQL++ is licensed under the LGPL, so the only people who can
legally link to it statically are those who are a) not redistributing
their program (rare); or b) licensing their program under the GPL or
LGPL (less rare, but still probably not the majority)
> 4) put the msqlpp.dll in project folder or in the folder where the
> executable is located, i.e. <project folder>\debug or somewhere in your
> path.
Another option is to set the Debug settings so the startup directory is
one that contains mysqlpp.dll. This is the path I'm choosing for the
wforms example I'm in the process of creating (see svn), since the
relative path to the library is known.
> I built the mysql++ library as
> static but it somehow still insists on finding the dll)
You may have set the linker settings using an import library instead of
the actual static library.