List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:March 29 2007 12:00pm
Subject:Re: Problems with Visual C++
View as plain text  
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.
Problems with Visual C++Michael Nye23 Mar
  • Re: Problems with Visual C++Warren Young23 Mar
    • Re: Problems with Visual C++Michael Nye24 Mar
      • Re: Problems with Visual C++gary clark24 Mar
        • Re: Problems with Visual C++Michael Nye25 Mar
          • RE: Problems with Visual C++Jim Wallace25 Mar
            • Re: Problems with Visual C++Michael Nye26 Mar
              • RE: Problems with Visual C++Jim Wallace26 Mar
                • Re: Problems with Visual C++Michael Nye28 Mar
        • Re: Problems with Visual C++Michael Nye26 Mar
Re: Problems with Visual C++Andre Sodermans29 Mar
  • Re: Problems with Visual C++Warren Young29 Mar
    • RE: Problems with Visual C++Matt Dargavel29 Mar
    • Re: Problems with Visual C++Warren Young29 Mar