Edit report at https://bugs.php.net/bug.php?id=63130&edit=1
ID: 63130 Comment by: gospodin dot p dot zh at gmail dot com 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 Type: Bug Package: Compile Failure Operating System: Windows PHP Version: 5.3Git-2012-09-21 (snap) Block user comment: N Private report: N New Comment: <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). Previous Comments: ------------------------------------------------------------------------ [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