Compiling error on WinXP

Compiling error on WinXP

am 27.12.2008 21:18:51 von Marco Schuster

Hi all,

I currently try to compile php 5.2.8 on Windows XP Home SP3 (32bit)
with VS2008 Pro, as described in
.
Compiling runs successful and the php.exe works with cscript /nologo
configure.js --disable-all --enable-cli --enable-object-out-dir=..
--disable-ipv6
But, as soon as I add --enable-sockets, I get the following error at
linking stage:
Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.

flock_compat.obj : error LNK2005: _inet_aton already defined in
php_sockets_win.obj
Creating library ..\Release_TS\php5ts.lib and object ..\Release_TS\php5ts.exp
...\Release_TS\php5ts.dll : fatal error LNK1169: one or more multiply
defined symbols found
NMAKE : fatal error U1077: '"C:\Programme\Microsoft Visual Studio
9.0\VC\BIN\cl.exe"' : return code '0x2'
Stop.

What causes this error and how can I fix it?

Thanks,
Marco

PS: Can I build a static exe which contains everything needed except a php.ini?

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Compiling error on WinXP

am 28.12.2008 02:44:01 von Elizabeth M Smith

Marco Schuster wrote:
> Hi all,
>
> I currently try to compile php 5.2.8 on Windows XP Home SP3 (32bit)
> with VS2008 Pro, as described in
> .
> Compiling runs successful and the php.exe works with cscript /nologo
> configure.js --disable-all --enable-cli --enable-object-out-dir=..
> --disable-ipv6
> But, as soon as I add --enable-sockets, I get the following error at
> linking stage:
> Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> flock_compat.obj : error LNK2005: _inet_aton already defined in
> php_sockets_win.obj
> Creating library ..\Release_TS\php5ts.lib and object ..\Release_TS\php5ts.exp
> ..\Release_TS\php5ts.dll : fatal error LNK1169: one or more multiply
> defined symbols found
> NMAKE : fatal error U1077: '"C:\Programme\Microsoft Visual Studio
> 9.0\VC\BIN\cl.exe"' : return code '0x2'
> Stop.
>
> What causes this error and how can I fix it?
>
> Thanks,
> Marco
>
> PS: Can I build a static exe which contains everything needed except a php.ini?

The manual is sadly out of date - here are some corrections

You no longer need to rename the winres.h for PHP 5.3 or 6.0 (fixed in CVS)

The links for the windows build tools and libraries are incorrect.
Windows build tools can be found at
http://pecl2.php.net/downloads/php-windows-builds/php-libs/b inary-tools.zip

You do NOT need to build bindlib - instead get the headers and prebuilt
resolv.lib files from
http://pecl2.php.net/downloads/php-windows-builds/php-libs
there are also other builds available on the site for up to date
required libraries

For more up to date instructions please see
http://wiki.php.net/internals/windows for more information on how to
build properly on windows

P.S. no you can't build a single .exe unless you manipulate the
generated makefile by hand before building - something you need to be
well versed in MSVC compiler foo to do ;)

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: Compiling error on WinXP

am 28.12.2008 02:51:46 von Marco Schuster

On Sun, Dec 28, 2008 at 2:44 AM, Elizabeth M Smith
wrote:
> The manual is sadly out of date - here are some corrections
Together with Pierre from #php-dev-windows on Freenode I managed to
compile 5.3 :)
I put the steps we used in this blog entry:
http://blog.harddisk.is-a-geek.org/index.php/dev/php/php-on- windows/
It's German, but Google Translate generates enough understandable
English so that someone with edit access can update the manual.

> P.S. no you can't build a single .exe unless you manipulate the generated
> makefile by hand before building - something you need to be well versed in
> MSVC compiler foo to do ;)
Ah, okay - thought it'd be as easy as with a lot of other programs in
Linux...but one can't expect good features in MS products ;)

Thanks,
Marco

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php