From: Warren Young Date: July 20 2009 7:15pm Subject: Re: Working without a dll List-Archive: http://lists.mysql.com/plusplus/8674 Message-Id: <4A64C238.2030903@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Robert Metcalf wrote: > Is this possible? Yes. Beware that it may not be legal to do so, due to MySQL++'s license. The distributed MySQL++ build system only creates dynamic libraries. If the viral aspects of the LGPL aren't a problem for you, the easiest way to get a static build of MySQL++ is to replace the tags in mysql++.bkl with tags, then run "bakefile_gen -f mingw" in the the MySQL++ top-level directory. You need to have Bakefile installed. > I guessed that linking against libmysqlpp.a would result in a .exe that > dosn't require the .dll to work. No, the .a file is called an import library. It is a very small file, containing only enough information to tell the MinGW version of ld how to set up linkage for the MySQL++ DLL. If you build MySQL++ statically, you also get a libmysqlpp.a, but it will be much bigger, since it now has the MySQL++ code within it. A few years ago they made MinGW's ld smart enough that it could link directly to a DLL, not needing a separate import library. The whole import library thing is therefore no longer strictly required, but it's still helpful as it lets you use standard POSIX style build scripts.