# compile php extension on visual c++ 2005

- Thread: https://externals.io/message/64267
- Original archive: https://news-web.php.net/php.internals/64267
- Started by Amir on 2012-12-12T11:18:20+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #64267 — Amir — 2012-12-12T11:18:20+00:00

URL: https://externals.io/message/64267#64267

Hi

Im compiling my c++ php extension on php 5.3 and visual c++ 2008
everything is ok and work fine, but I have to (and I force) to using php
5.2.9 and compile it via vc++ 2005.

I got this error during compile:
*zend\zend_config.w32.h(38) : fatal error C1083: Cannot open include file:
'winsock2.h': No such file or directory*
*
*
I changed my windows SDK include directory, set environment variables and..
But have still error.

I compiled with vc++ 2008 and get another error:
*microsoft visual studio 8\vc\include\sys\stat.inl(44) : error C2466:
cannot allocate an array of constant size 0*

---

## #64268 — Pierre Joye — 2012-12-12T11:28:05+00:00

URL: https://externals.io/message/64267#64268 · In reply to: #64267

hi,



> Im compiling my c++ php extension on php 5.3 and visual c++ 2008
> everything is ok and work fine, but I have to (and I force) to using php
> 5.2.9 and compile it via vc++ 2005.
>
> I got this error during compile:
> *zend\zend_config.w32.h(38) : fatal error C1083: Cannot open include file:
> 'winsock2.h': No such file or directory*
> *
> *
> I changed my windows SDK include directory, set environment variables and..
> But have still error.
>
> I compiled with vc++ 2008 and get another error:
> *microsoft visual studio 8\vc\include\sys\stat.inl(44) : error C2466:
> cannot allocate an array of constant size 0*

Sorry but we do not support anything under VC9 (2008). PHP 5.2, while
being dead since years, never supported anything but VC6.

Cheers,
--
Pierre

@pierrejoye
