Re: Can't compile an extension without tweaking headers
| From: | Wez Furlong | Date: | Mon, 18 Oct 2004 21:31:40 +0000 |
| Subject: | Re: Can't compile an extension without tweaking headers | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-1470@lists.php.net to get a copy of this message | ||
We only support the MS C compiler.
And to be honest, it just doesn't make sense to support any of the
others because too much code makes assumptions about the MS libc; both
in PHP itself and in third party DLLs and libraries.
If you really want to push to support an alternate compiler, you need
to make sure that it won't break the build for the rest of us, and
supply the diff against HEAD; it's no use doing it for PHP 4 because
that is a frozen branch.
If the diff is not too ugly, we might accept it into CVS, but only on
the proviso that more than one person will actively maintain
it--otherwise it will go stale and we will be left with cruft in CVS
that we don't use.
--Wez.
On Mon, 18 Oct 2004 15:28:58 -0300, Rubem Pechansky
<pechansky@hypervisual.com> wrote:
> Hi,
>
> When I started working on my extension (WinBinder, see URL below), I tried
> to include php.h "as is" but I always got several compiler errors. (I use
> lcc-win32 as the compiler, mainly because it's very fast.) After a lot of
> tweaking on some .h files (from version 4.3.4), I finally was able to
> compile php_winbinder.dll without errors. Since then I'm using those altered
> files, however, this is not practical because I can't easily update the
> headers to a newer version. The header files are at
> http://winbinder.sourceforge.net/files/tweaked_headers_4.zip in
> case you
> want to look at them.
>
> I've also tested MinGW and Pelles C, and I discovered that: 1) I also must
> use the tweaked headers with them; and 2) the DLLs they produce won't work.
> However, Rick was able to build WinBinder on MS Visual Studio, which seems
> to be kind of the "official" compiler for PHP under Windows.
>
> Is there a "magic" tweak (say on config.w32.h) or a special set of headers
> to compile an extension for PHP?
>
> Thanks in advance for any clues.
>
> -------------------
> Rubem Pechansky
>
> WinBinder - The native Windows binding for PHP
> http://winbinder.sourceforge.net/
> winbinder-discussion@lists.sourceforge.net
>
> Hypervisual - Advanced Design for IT
> http://hypervisual.com/
>
> --
> PECL development discussion Mailing List (http://pecl.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>