|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-09-21 11:55 UTC] 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" PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Mar 31 12:00:01 2026 UTC |
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