Re: PHP C++ extension on Windows
Hi Thomas,
On Fri, May 9, 2014 16:21, Thomas Hruska wrote:
> On 5/9/2014 3:06 AM, O'Neil Delpratt wrote:
>
>>
>> On 9 May 2014, at 10:26, Pierre Joye <pierre.php@gmail.com> wrote:
>>
>>
>>> hi,
>>>
>>> On Fri, May 9, 2014 at 11:20 AM, O'Neil Delpratt <oneil@saxonica.com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>>
>>>> Is there a better way to build a PHP C++ extension for PHP 5.5 than
>>>> in Visual studio? I know it can be done in the PHP build process
>>>> for windows as described in the book “Extending and Embedding PHP”
>>>> by Sara Golemon which I did try but failed with linking errors,
>>>> maybe because of the config.w32 file not being setup properly.
>>>> Under linux I have no issues.
>>>>
>>>
>>> Actually the better and recommended way is not to use VS but for
>>> debugging.
>>>
>>> See https://wiki.php.net/internals/windows/stepbystepbuild
>>>
>>
>>
>> How about building your own extension? There seems to be a lack of
>> information about doing that on windows
>
> The Wiki link above does have implied instructions for building
> extensions in it already (step 14):
>
> configure --disable-all --enable-cli --enable-[yourextension]
>
> Or --with-[yourextension] depending on your needs. But it isn't exactly
> obvious. "$remains" doesn't mean anything to me. But the above is
> sufficient to prepare to build a minimal PHP with support for your new
> extension.
>
> PHP is very *NIX-centric, so I've found that writing an extension first
> on a Linux host (e.g. Ubuntu) and then porting it to Windows is a lot
> easier than the reverse.
>
that is discussable while often done exactly that way. The build system on
windows mimics autotools so many function names are the same. As well as
using --with-.. if you have a dep and --enable-.. if it has none.
Regards
-anatol
Thread (24 messages)