Skip to Content.
Sympa Menu

freetds - Re: [freetds] FreeTDS and Windows

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Paul Thurston <pthurston AT netegrate.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] FreeTDS and Windows
  • Date: Fri, 7 May 2010 08:33:33 -0700

Harry:

I've been using a Windows build for FreeTDS for about a year now.
When I built this under Windows Vista using VC9, I recall there was a bug in
the <net.c> source file which failed to activated the Winsock dll.
(Windows has that annoying TCP/IP initialization protocol. ugh!) This might
be the cause the " login failure" you observed.

The way I found this issue was to build a debug version of FreeTDS, and
construct a simple "hello SQL" app to drive the library.
As I recall, the bug was fixed in a subsequent patch, but I never got the
chance to test the patch.

For the first step in the process, can you see if you can get a simple VC10
"hello SQL" app working?


Paul


From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of Harry Sfougaris
Sent: Friday, May 07, 2010 11:16 AM
To: a_wake AT earthlink.net; FreeTDS Development Group
Subject: Re: [freetds] FreeTDS and Windows




On 07 Μαϊ 2010, at 6:09 μ.μ., Andrew H. Wakefield wrote:



> Harry,

>

> I am far, far from an expert, but I have been doing some experimenting

> with FreeTDS and Windows. I am using CodeBlocks and wxWindows to build

> apps. I had to compile FreeTDS using MinGW, but as I recall there was

> some odd setting I had to change in the make file -- I'll see if I can

> dig up what I did.

That'll be great, because this is really frustrating for me.



>

> I did notice that you are linking libTDS.lib AND dblib.lib -- I think

> the latter includes the former, so you might try taking it out and see

> what happens.

>

When I only had dblib.lib I was getting linker errors about some tds_
functions.







> Andy Wakefield

> a_wake AT earthlink.net<mailto:a_wake AT earthlink.net>

>

> On Fri, 2010-05-07 at 14:21 +0300, Harry Sfougaris wrote:

>

>> Summary of my struggles so far (sorry for the new post, but it's not MinGW
>> and Windows anymore):

>>

>> v0.82 (stable version):

>> Visual Studio 2010 (using \win32\msvc6\FreeTDS.dsw):

>> - FreeTDS compiles ok (with warnings).

>> - Trying to use the libraries in a console application, I have to add
>> WS2_32.lib and WSock32.lib in order to build.

>> - The application crashes when calling dbopen: tracing into this

>> it's the tds_open_socket call at line 428 of login.c

>>

>> v0.83.20100122 (Nightly snapshot)

>> Visual Studio 2008 & 2010 (using FreeTDS.sln in the root of the source
>> code):

>> - Does not compile at all.

>> - fakepoll.h seems to get included more than once, thus generating
>> macro redefinition warnings and an error for 'pollfd' : 'struct' type
>> redefinition

>> - net.c line 243 - I get #error One should be defined

>>

>> Qt:

>> Adding the following

>> C:/windows/system32/msvcrt.dll \

>> C:/windows/system32/ntdll.dll

>> on top of WS2_32 and WSock32 solves the linker issues, but I still get the
>> application crash (like in Visual Studio).

>>

>> Am I missing some other library I should be linking?

>> Currently I am at:

>> C:/freetds-0.82/lib-win/dblib.lib \

>> C:/freetds-0.82/lib-win/libTDS.lib \

>> C:/freetds-0.82/lib-win/WS2_32.lib \

>> C:/freetds-0.82/lib-win/WSock32.lib \

>> C:/windows/system32/msvcrt.dll \

>> C:/windows/system32/ntdll.dll

>>

>> Maybe I am linking something that I shouldn't?

>>

>> Maybe someone has a working copy of built libraries (dblib.lib +
>> libTDS.lib) for Windows he can share?

>>

>> Thanks,

>>

>> Harry Sfougaris

>>

>>

>>

>>

>>

>>

>> _______________________________________________

>> FreeTDS mailing list

>> FreeTDS AT lists.ibiblio.org<mailto:FreeTDS AT lists.ibiblio.org>

>> http://lists.ibiblio.org/mailman/listinfo/freetds

> _______________________________________________

> FreeTDS mailing list

> FreeTDS AT lists.ibiblio.org<mailto:FreeTDS AT lists.ibiblio.org>

> http://lists.ibiblio.org/mailman/listinfo/freetds



Harry Sfougaris









_______________________________________________

FreeTDS mailing list

FreeTDS AT lists.ibiblio.org<mailto:FreeTDS AT lists.ibiblio.org>

http://lists.ibiblio.org/mailman/listinfo/freetds



Archive powered by MHonArc 2.6.24.

Top of Page