[freetds] building freetds on windows

ericP eric+ibiblio at w3.org
Sun Jun 22 09:16:26 EDT 2014

Some code base I'm working on (SWObjects, if you care) has a freetds
driver, as well as a few other database drivers. Apart from the
freetds driver, the rest of the code builds on Windows without a lot
of fiddling.

The freetds, which builds trivially on linux, seems to require some
extra infrastructure on Windows. The Nmake recipe

  nmake -fNmakefile -nologo apps PLATFORM=win32 CONFIGURATION=debug

works but doesn't build include/tds_sysdep_public.h from the .in.  I
figured that configure would run autoconf and generate the appropriate
files but /bin/sh is rare on Windows. I used the MINGW32 shell that
comes with gitshell but that whined about missing DLLs
(e.g. mspdb100.dll when runing MSVC's cl.exe, cygintl-2.dll when just
running configure).

I eventually copied tds_sysdep_public.h{.in,} and edited out all the
stuff with automake macros (the bottom half of the file). It built and
linked, but I haven't tested 'cause I'm not half smart enough to
configure MS SQL.

Presuming the above recipe worked and was necessary, I'd like to streamline it a bit by having windows builds for autoconf files (well, at least the one that I needed). It seems more likely that I missed a simple way for MSVC folks to do this (i.e. doesn't involve cygwin, ming, etc.).


office: +1.617.599.3509
mobile: +

(eric at w3.org)
Feel free to forward this message to any list for any purpose other than
email address distribution.

There are subtle nuances encoded in font variation and clever layout
which can only be seen by printing this message on high-clay paper.

More information about the FreeTDS mailing list