Header files for the Windows packages

Header files for the Windows packages

am 14.10.2010 19:50:34 von Zouzou

Hi,

I am using PHP on Windows (IIS), and currently creating a PHP extension via
SWIG . In order to do that, i need the header files
that were used when my PHP package got produced. I've looked all over the
PHP site but i can only find binary or source downloads, not header /
library packages.

On Linux, it's easy: there is a package called "php-dev" or "php-devel"
which contains those header files; for example on

(scroll to the bottom to see the file list).

But for Windows, i can't find any such package. There is actually a library
file being distributed, under dev/php5.lib. However i can't find any header
(.h) file that i could use in order to link with that library!

Therefore, my only solution has been to download the source code and run a
full compilation using the config flags visible in a phpinfo. There are some
generated header files (like acconfig.h) so i can't just download the code
and grab all the .h files - i have to fully compile it. At that point, of
course, i also get another php5.lib library and new binary files, which
render the official binary distro that i downloaded from
useless.

When i'm done compiling, i run the following command to keep only header
files:
find . -not -name '*.h' -delete

And there we go, i have my own php-devel package for Windows! This is fine
for me, but i can't ask the people who are going to compile my program to
fully compile PHP just to get these files. I could distribute them, but what
if my files differ from the binary distro that they are using? At that
point, i would also have to distribute my own binary files, which is getting
way too obnoxious and hard to maintain.

So here is my request: when generating a Windows distro, could you pack all
header files using a command similar to the one above and make them
available, either as a separate link, or directly under the "dev" directory?
That dir already contains a library so it would make sense to put the
headers that have to be used to compile against that library in the same
place.

Thanks,
Zouzou


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Header files for the Windows packages

am 14.10.2010 20:15:10 von Pierre Joye

hi,

To build PHP or extensions on Windows, see
http://wiki.php.net/internals/windows/stepbystepbuild

devel files like what is available on linux won't happen in a near future.

Cheers,

On Thu, Oct 14, 2010 at 7:50 PM, Zouzou wrote:
> Hi,
>
> I am using PHP on Windows (IIS), and currently creating a PHP extension v=
ia
> SWIG . In order to do that, i need the header files
> that were used when my PHP package got produced. I've looked all over the
> PHP site but i can only find binary or source downloads, not header /
> library packages.
>
> On Linux, it's easy: there is a package called "php-dev" or "php-devel"
> which contains those header files; for example on
> ..fc13.x86_64.html>
> (scroll to the bottom to see the file list).
>
> But for Windows, i can't find any such package. There is actually a libra=
ry
> file being distributed, under dev/php5.lib. However i can't find any head=
er
> (.h) file that i could use in order to link with that library!
>
> Therefore, my only solution has been to download the source code and run =
a
> full compilation using the config flags visible in a phpinfo. There are s=
ome
> generated header files (like acconfig.h) so i can't just download the cod=
e
> and grab all the .h files - i have to fully compile it. At that point, of
> course, i also get another php5.lib library and new binary files, which
> render the official binary distro that i downloaded from
> useless.
>
> When i'm done compiling, i run the following command to keep only header
> files:
> =A0 find . -not -name '*.h' -delete
>
> And there we go, i have my own php-devel package for Windows! This is fin=
e
> for me, but i can't ask the people who are going to compile my program to
> fully compile PHP just to get these files. I could distribute them, but w=
hat
> if my files differ from the binary distro that they are using? At that
> point, i would also have to distribute my own binary files, which is gett=
ing
> way too obnoxious and hard to maintain.
>
> So here is my request: when generating a Windows distro, could you pack a=
ll
> header files using a command similar to the one above and make them
> available, either as a separate link, or directly under the "dev" directo=
ry?
> That dir already contains a library so it would make sense to put the
> headers that have to be used to compile against that library in the same
> place.
>
> Thanks,
> Zouzou
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



--=20
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Header files for the Windows packages

am 14.10.2010 20:51:04 von Zouzou

> hi,
>
> To build PHP or extensions on Windows, see
> http://wiki.php.net/internals/windows/stepbystepbuild

Hi,

I am well aware of that wiki page since it is what i followed to build PHP
in order to get my own header files. However, it doesn't explain how one is
supposed to build a dynamic library extension for Windows without building
the PHP source code.

>
> devel files like what is available on linux won't happen in a near future.

May i know the reasons why, or a pointer to a discussion that explains it? I
haven't been able to find it.
I am also wondering why a library file is being distributed in the "dev"
directory, but not the header files that go with it.

Are the reasons it won't be happening soon a design problem or only
practical? Because in the latter case, i did provide a command that seems
quite close to taking care of that - and, although my knowledge of the PHP
tree is very basic, i would be glad to help in integrating that command in
the production of the distro.

Zouzou


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Header files for the Windows packages

am 14.10.2010 22:01:57 von Pierre Joye

hi,

On Thu, Oct 14, 2010 at 8:51 PM, Zouzou wrote:

>>
>> devel files like what is available on linux won't happen in a near future.
>
> May i know the reasons why, or a pointer to a discussion that explains it? I
> haven't been able to find it.
> I am also wondering why a library file is being distributed in the "dev"
> directory, but not the header files that go with it.

Historical reasons but tons of headers are missing and are not being
installed by nmake install.

The 'not in a near future' means not with 5.3, or not in the next months.

You don't have to build PHP everytime, do it once, then you only
(re)build your extension. To build it as shared and as long as you
defined the config.w32 correctly, all you have to do is
'--enable-myext=shared' at configure time.

Cheers,
--
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php