6

What are first steps creating a loadable DLL module extension for PHP to create native support for my own library on Windows?

Would it require re-compiling PHP on windows? What are the tools needed? I don't want to have to use exec and the command line.

2 Answers 2

4

See for the basic steps to compile PHP or PHP extensions:

https://wiki.php.net/internals/windows/stepbystepbuild

1
2

Q. Would it require re-compiling PHP on windows?
A. Not necessarily, but it is the simplest way.

The command line is your best friend (apple, after years of GUI improved MACOS by ... readding the shell back)

I would try the following:

A. Setup a mingw-msys build system on win.
B. Follow PHP Extension Manual:
1. Download PHP Source code
2. Build PHP for Extension Development using the above MSYS
3. Generate a extension skeleton using ext_skel your extension will reside in ext/ directory
4. Edit the config.w32 (is a javascript macro system for Makefile generation similar to m4)
...
Continue by following these:
http://www.php.net/manual/en/internals2.php
http://talks.somabo.de/200610_zend_conf_php_extension_development.pdf

1
  • 4
    That's totally wrong. mingw will not work, it relies on VC6 crt which we don't support anymore. Also the compiler itself is not supported.
    – Pierre
    Jul 8, 2011 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.