Re: [INTERNALS-WIN] 5.2.8 Build problem - php_cli.c compile fails
[email protected] (Pierre Joye)
| Newsgroups | php.internals.win |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Feb 4, 2009 at 1:16 AM, David M. Patterson <[email protected]> wrote: > I have been unable to build PHP 5.2.8 (release or snapshot from this > afternoon). > > My guess is that I haven't set up my build environment correctly since the > binary Windows snaps seem to building OK. > > > > I'm using Visual Studio V6 and Microsoft Windows Server 2003 SDK. > > > > I have a directory C:\PhpDev. > > Within C:\PhpDev are the php-5.2.8 source tree and the php_build tree from > http://pecl2.php.net/downloads/php-windows-builds/php-libs/binary-tools.zip. > > > > I perform the following steps: > > - Change to C:\Php_dev\php-5.2.8. > > - "c:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT" > > - buildconf.bat > > - cscript /nologo configure.js --disable-all --enable-cli > --enable-object-out-dir=. > > - nmake > > > > Execution of configure.js resulted in no warnings or errors. > > > > When nmake attempts to compile php_cli.c it reports: > > error C2027: use of undefined type 'addrinfo' in > > C:\Program Files\Microsoft SDK\Include\.\wspiapi.h(168) > > > > A couple of dozen additional errors are reported, all related to the missing > addrinfo structure definition. > > > > William Rowe responded to my original post with: > > "The fix is trivial, I'll have something shortly, sorry I've been swamped > since I put together these fixes. > > > > Essentially we simply need to ensure that _WINSOCK_H_ is defined to prevent > the SDK from including winsock.h, and then ensure that winsock2 is included > consistently. winsock.h is long, long dead." > > > > I have been trying to implement this advice but no joy so far. > > I have successfully defined _WINSOCK_H_ and have changed the only instance > that I could find of #include winsock.h to #include winsock2.h, but still > get the same error. You have to put the platform SDK include directory first in the path lists. See: http://cvs.php.net/viewvc.cgi/php-internals-win/script/conf_tools.bat?revision=1.4&view=markup VC6_INCLUDE, VC6_LIB and VC6_PATH are the variables you can use, like: set INCLUDE=%VC6_INCLUDE% set LIB=%VC6_LIB% set PATH=%VC6_PATH% after having updated the path to your local installation :) Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org