[freetds] freetds and windows

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Mon Apr 11 05:21:52 EDT 2005


> 
> Brett <generica at email.com> wrote:
> > On Sat, 9 Apr 2005, James K. Lowden wrote:
> > > Brett <generica at email.com> wrote:
> > >> The next plan was to compile it under windows, which I 
> thought would
> > >be> straightforward.  We already had the system compiling under
> > >windows,> with faked calls for the sql stuff, so it was 
> just a case of
> > >using the> freetds code, and linking it in with the 
> windows libraries.
> > >
> > > Ah, but it is not straightforward. :-(  As you found, the 
> VC++ project
> > > in the win32 directory builds the ODBC driver only.  If 
> you update it
> > > to build db-lib, I would be glad to include your version 
> in the main
> > > distribution.
> > >
> > 
> > So does that mean, in it's current state, this won't work 
> under windows
> > ?
> 
> You can't simply unpack the source distribution and compile 
> db-lib under
> Windows, no.  With a little work, you probably can, because 
> the underlying
> communications library (libtds) does compile as part of the 
> ODBC driver.  
> 

0.64 contains msvc6 project files for dblib as a static library.

> > > shell32.lib?  That's a surprise.  What does db-lib need from that?
> > 
> > from memory, something about finding a filename's path from 
> desktop, or 
> > some odd windows function.
> 
> I'd be a little concerned that you're being misled.  I'm sure 
> there's no
> Windows-specific code in db-lib, nor any GUI interaction.  
> All it needs
> should come from the C standard library.  
> 

To detect application data directory (that is the windows "home"
directory).

> > I've never had any luck debugging this program, since it is not 
> > straightforward c, but a mix of c and prolog, compiled by a prolog 
> > compiler into an executable.  Generally debuggers 'just 
> don't work' with
> > 
> > it :(
> 
> If I were you and wanted to get db-lib compiled under Windows, I would
> begin by making sure the basic fuctions work.  You could try
> src/dblib/unittests/t0001.c, or src/apps/freebcp.c.  Those you can at
> least debug and we'll have a common frame of reference.  Once 
> freebcp can
> load and extract a table on your server, you'll be in a 
> position to link
> db-lib to your application.  
> 

I would suggest to set environment to do logging (see UserGuide).

freddy77



More information about the FreeTDS mailing list