[freetds] mingw, gcc 3.4.2 & freetds-0.64

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Fri Aug 25 04:48:19 EDT 2006


> >>     
> >
> > I just added some WSAStartup calls. I don't know if they work with
> > --disable-shared but I can confirm that tsql works!
> >
> >   
> > Frediano
> Yes, that definitely fixed the problem.  Do you think calling 
> WSAStartup() should be the responsibility of the user app, or 
> should it 
> be part of tds_open_socket() (with a matching WSACleanup() in 
> tds_close_socket()) ?
> 

Good question. I think dll should call WSAStartup (already done). For
library perhaps dblib could use dbinit/dbexit and ctlib could use
ct_init/ct_exit. However I think that if soneone wants to use static
library you should know that it has to call WSAStartup. Honestly I think
that if someone want to use socket in windows it should just link to
wsock32.dll or ws2_32.dll but it seems that Microsoft don't think so.

freddy77




More information about the FreeTDS mailing list