Compiling FreeTDS 0.82 under Windows (MVC)

Eloy Lafuente <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Hi,

I've been trying to build latest FreeTDS version under 
Windows these days (yes, I know I'm crazy :-P ).

The main cause for this is that the "official" builds from 
Frank Kromann are based in older versions of FreeTDS that 
have some important bugs like the one in ntext/nvarchar... 
returning NULLs instead of empty strings that was fixed some 
time ago in FreeTDS upstream.


I must admit that this is my first experience with MVC (and 
hopefully the last :-P ) but right now I'm stopped in a 
point I need some help. And C++ compilers aren't one of my 
skills at all.

Here it's what I've done until now:

- Download all the PHP requisites (MVC, .NET, MS SDK).
- Build the "php-build" environment (with all the required
   binaries, libraries and includes). Set environment 
variables as required (PATH, LIB, INCLUDE, BISON_SIMPLE).
- Download freetds 0.82 (stable).
- Go to freetds/win32/mscv6 and open the dblib.dsp project, 
building it.
- Copy the dblib.lib generated in previous step to 
"php-build"/lib
- Copy all the freetds/include files to "php-build"/include.
- execute buildconf
- execute csscript /nologo configure.js --disable-ipv6 
--with-dblib
- execute nmake

Then I get this error:

main\internal_functions.c(69) : error C206 
'phpext_dblib_ptr' : undeclared identifier

That identifier is created by the configure script and is 
the primary cause of my headaches. I've tried also to 
replace it with phpext_mssql_ptr (without knowing at all 
what it means, I know) but then I end with a lot of 
undefined symbols.

Note that, if I omit the --with-dblib in configure, then I 
get PHP properly built and working.

For reference, I've found this, showing the same error, but 
the thread seemed to end without solution (or at least I 
haven't been able to get it):

http://lists.ibiblio.org/pipermail/freetds/2008q2/023408.html

And that's all I can say (know). Any insight will be 
welcome. Having modern builds of FreeTDS running under 
windows will help us (moodle.org) a lot. TIA!

Ciao, Eloy Lafuente (stronk7) :-)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.