List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:July 20 2009 7:15pm
Subject:Re: Working without a dll
View as plain text  
Robert Metcalf wrote:
> Is this possible?


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 <dll> tags in
mysql++.bkl with <lib> 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.

Working without a dllRobert Metcalf15 Jul
  • Re: Working without a dllWarren Young20 Jul