#39130 [Com]: Compile failure when using VC++ 2005
| From: | someone at farpost dot com | Date: | Tue, 12 Feb 2008 03:54:48 +0000 |
| Subject: | #39130 [Com]: Compile failure when using VC++ 2005 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-122192@lists.php.net to get a copy of this message | ||
ID: 39130
Comment by: someone at farpost dot com
Reported By: ben dot yan at msn dot com
Status: Assigned
Bug Type: Compile Failure
Operating System: Windows
PHP Version: 5.2CVS-2007-07-22
Assigned To: wez
New Comment:
Fixed this error adding symbol _USE_32BIT_TIME_T to all projects in the
Preprocessor Definitions.
Previous Comments:
------------------------------------------------------------------------
[2008-02-12 02:30:31] someone at farpost dot com
Version 5.2.5 and VS 2005. Still have this problem.
------------------------------------------------------------------------
[2007-07-22 15:38:01] jani@php.net
Wez, can you please check this out, it should be simple fix (for
someone who actually has this VC++ thingie)
------------------------------------------------------------------------
[2007-07-22 06:43:08] ben dot yan at msn dot com
hi,
I recompile eAccelerator v0.9.4(http://www.eaccelerator.net/) with the
latest PHP(http://snaps.php.net/php5.2-latest.tar.gz), but the same
problems are still there.
------------------------------------------------------------------------
[2007-06-15 12:47:02] grotaiche at hotmail dot com
Yeah, I have the same problem too. I recompile my extension with VS
2005 for every PHP release and I have had the problem for a while.
Commenting the #define _USE_32BIT_TIME_T 1 line is not very difficult
but it is a by-pass ; a more viable solution would be appreciated :)
Thanks !
------------------------------------------------------------------------
[2007-06-02 10:52:53] cxd at webpan dot com
Trying to compile a module for PHP 5.2.3 with VC++ 2005 SP1 I also get
tons of error like:
error C2466: cannot allocate an array of constant size 0
This module (eAccelerator for Windows) compiled fine with VC++ 2005 SP1
and PHP 5.2.2.
The following might explain the cause of the problem (not sure?) that
was (re)introduced with 523( again my module compiles great with PHP 522
& VC++ 2005):
----------------------------------
deprecated "default to int" rule:
Pre-standard C++ (and all C variants predating C99), use the "default
to int" rule when
declarations of functions and variables do not contain an explicit
datatype.
This behavior is maintained in Visual C++ 6.0 as the following
declarations show:
const x=0; //implicit int
static num; // implicit int
myfunc(void *ptr); //implicit return type int
In Visual Studio 2005, you have to specify the datatype explicitly:
const int x=0; static int num; int myfunc(void *ptr);
--------------------
Hope this helps...
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/39130
--
Edit this bug report at http://bugs.php.net/?id=39130&edit=1