Re: can't build dll with gnutls on Windows

Frediano Ziglio <[email protected]> Fri, 2 Jun 2017 09:47:19 +0100
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CAHt6W4cXSnH-gs7Ns2T0zWt3-BkA3ZMp9rpaS36r8oWCO8gnMQ@mail.gmail.com>
2017-05-25 13:07 GMT+01:00 Glenn Campbell <[email protected]>:
> I need a freetds dll that uses gnutls instead of openssl for an old Windows
> application that uses db-library. All of the pre-built binaries I've found
> use openssl instead of gnutls. I attempted to build it myself but
> unfortunately I haven't been able to do so.
>
> I am new to CMake but as best I can tell the CMakeLists.txt doesn't try to
> locate the gnutls artifacts. So, I downloaded the gnutls windows binary
> package, made some ugly hacks to the CMakeLists.txt file, and set the
> CMAKE_PREFIX_PATH environment variable so that CMake appears to be locating
> the gnutls artifacts. However, when I open the generated sln file in Visual
> Studio 2013 and attempt to build the dll I get errors from gnutls.h that
> seem to indicate that ssize_t is undefined. So I'm stuck at this point.
>
> After getting stuck trying to use CMake I decided to try MingW. And when I
> got stuck with MingW I tried Cygwin. My results with both MingW and Cygwin
> were similar. I am unfamiliar with both of them and there appear to be a
> lot of steps I'm missing between "download and install MingW (or Cygwin)"
> and "build the freetds windows dll".
>
> Can anyone point me in the right direction? I just need a freetds dll using
> gnutls and its corresponding lib file so that I can rebuild my application
> with Visual Studio. It doesn't matter much to me how I have to generate the
> dll (CMake/MingW/Cygwin).
>
> Thanks in advance.

Why not using OpenSSL?
Don't use cygwin, FreeTDS fully support visual studio and MingW so I
don't see a point in using cygwin, would just add a layer with no much value.
I could give a try, don't think is too hard but I never used GnuTLS on Windows;
can you give some advice?
Can you post the errors you are getting? If is just a ssize_t problem maybe a
simple include would solve it. ssize_t should be a C99 standard type so maybe
you could get better results with VS 2015.

Frediano