Re: ext/odbc no longer builds under VC6

[email protected] (Patrick van Kleef)
Newsgroups php.internals.win
Message-ID <[email protected]>
Hi Steph,

>
> I finally got around to upgrading to the 2003 SDK today. And then I  
> ran:
>
> buildconf
> configure --enable-debug
> nmake > make.log
>
> You may be interested to see that make log (attached as  
> make.log.txt in an attempt to beat the attachment stripper).
>
> It seems that a commit you made *3 months ago* (!) comprehensively  
> broke the VC6 build, so please could you fix it in a way that will  
> work for both/all supported compilers. I know everyone's mad-keen  
> to have VC9 the only supported Windows compiler PHP, but at present  
> the Apache distribution is still rolled using VC6. Nobody outside  
> the PHP snaps box is actually able to build PHP_5_3 with VC6 for  
> now, unless they cheat:
>
> --disable-odbc
>
> I'm fairly sure that wasn't your aim.
>

Indeed it was not, although i did make some assumptions on what  
version of ODBC is installed on a typical windows machine.

First of all, my patches have been tested to work on VC6 (both 32 and  
64bit) before i released it to the PHP public. The company i work for  
is currently in the process of migrating from VC6 to VC9 and we will  
have a number of patches and insights we would like to share with the  
PHP windows development team at a later point. Both compilers have  
their distinct features and pitfalls that developers need to be aware  
about.

Secondly, to my knowledge, the header files and libraries for  
developing ODBC enabled applications on Windows is not part of the  
compiler itself but of either the Platform SDK or the MDAC package  
installed. I believe these have been renamed to the "Windows SDKs"  
package recently, but in either case upgrades for all of these can be  
found free of charge on http://download.microsoft.com/ If you have  
any problems locating any of these packages, let me know and i will  
dig up the complete urls for them.

Thirdly, the version of the ODBC API (3.51) that i uses as a base for  
these patches has been around for some 5 years, and is available on  
all modern platforms including Windows, Unix, Linux and Mac OS X.

I am guessing you are using a very old version of either of these  
packages on your machine. Or you may have still a very old sql.h or  
sqltype.h file installed somewhere in front of your include path. Or  
as a last option, you may have defined ODBCVER to 0x0250 or 0x0300  
before including the sql.h file maybe in your VC project file.

Can you send me a private email ([email protected]) with the following  
information:

    - Version of Windows
    - Version of Microsoft Platform SDK
    - Version of MDAC
    - Setting of ODBCVER in your VC compiler project if any.

Also check what sqltype.h files are on your build system and make  
sure they have ODBCVER 0x0351 inside. If in doubt zip up all the  
sqltype.h files you can find and send them to me.

Based on this information, i can make some changes or recommendations.

However i would like to make clear that without using this ODBC 3.51  
API, it will be impossible for PHP to move into the 64bit windows  
realms without loosing major data connectivity.

Is there some list on the Wiki where you register the minimum  
versions of third party libraries and sdk's needed on Windows to  
properly build php?

Patrick
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.