Edit report at https://bugs.php.net/bug.php?id=63130&edit=1

 ID:                 63130
 Updated by:         a...@php.net
 Reported by:        gospodin dot p dot zh at gmail dot com
 Summary:            "cannot allocate an array of constant size 0" or
                     "dllimport not allowed"
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            Compile Failure
 Operating System:   Windows
 PHP Version:        5.3Git-2012-09-21 (snap)
-Assigned To:        
+Assigned To:        ab
 Block user comment: N
 Private report:     N

 New Comment:

this looks like solved :)


Previous Comments:
------------------------------------------------------------------------
[2012-09-21 13:18:20] gospodin dot p dot zh at gmail dot com

<i>[2012-09-21 12:53 UTC] larue...@php.net
here is a tricky way to fix this, please try with it: </i>
----------------------
IMPOSIBRU!!1 This worked fine! Thanks a lot! I've spend 2 days trying to solve 
one 
of those errors. Finally i can go on writing extension which can give me the 
only 
instance of COM connection to third part application on apache server, 
available 
and same for each web-site user (session).

------------------------------------------------------------------------
[2012-09-21 12:53:15] larue...@php.net

here is a tricky way to fix this, please try with it:

vi {THE VS INSTALL FODLER}\vc\include\malloc.h 

change the line:
#define _STATIC_ASSERT(expr) typedef char __static_assert_t[ (expr) ]  

to:

#ifdef PHP_WIN32  
#define _STATIC_ASSERT(expr) typedef char __static_assert_t[ (expr)?(expr):1 ]  
#else  
#define _STATIC_ASSERT(expr) typedef char __static_assert_t[ (expr) ]  
#endif

------------------------------------------------------------------------
[2012-09-21 11:55:50] gospodin dot p dot zh at gmail dot com

Description:
------------
#include <iostream>
//#include "php_test_empty.h"
#include "targetver.h"
#include "php.h"

------------
>c:\program files (x86)\microsoft visual studio 9.0\vc\include\sys\stat.inl(44) 
: error C2466: невозможно выделить память для 
массива постоянного нулевого 
размера
1>c:\program files (x86)\microsoft visual studio 
9.0\vc\include\sys\stat.inl(49) 
: error C2466: невозможно выделить память для 
массива постоянного нулевого 
размера
1>c:\program files (x86)\microsoft visual studio 
9.0\vc\include\sys\utime.inl(39) : error C2466: невозможно 
выделить память для 
массива постоянного нулевого размера
1>c:\program files (x86)\microsoft visual studio 
9.0\vc\include\sys\utime.inl(44) : error C2466: невозможно 
выделить память для 
массива постоянного нулевого размера
1>c:\program files (x86)\microsoft visual studio 
9.0\vc\include\sys\utime.inl(49) : error C2466: невозможно 
выделить память для 
массива постоянного нулевого размера
1>c:\program files (x86)\microsoft visual studio 
9.0\vc\include\sys\utime.inl(78) : error C2466: невозможно 
выделить память для 
массива постоянного нулевого размера

----------
means "cannot allocate an array of constant size 0"

DO SOMETHING FINALLY!!!!!!!11111oneone
MS Visual Studio 2005 don't exists any more. Make your sources up to date with 
IDE with less spaghetti-code. 

Expected result:
----------------
i've expected to make an extension which can use <string> and <iostream>

Actual result:
--------------
"cannot allocate an array of constant size 0"
or 
"definition dllimport not allowed"


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=63130&edit=1

Reply via email to