Re: [INTERNALS-WIN] Developing PHP extensions on Windows with VC++, linking problems
| From: | Eugenio Tacchini | Date: | Tue, 19 May 2009 22:00:01 +0000 |
| Subject: | Re: [INTERNALS-WIN] Developing PHP extensions on Windows with VC++, linking problems | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals.win |
| Request: | Send a blank email to internals-win+get-493@lists.php.net to get a copy of this message | ||
At 10.17 11/05/2009 +0200, Kalle Sommer Nielsen wrote:
Hi 2009/5/11 Eugenio Tacchini <eugenio@favoriti.it>:Thanks again Kalle! I don't have any php_my_extension.h files, I need to create it? I just have a stdafx.h file. Sorry if the question is trivial...At 08.26 11/05/2009 +0200, Kalle Sommer Nielsen wrote:This is defined in the php_<myext>.h file, so your php_<myext>.h file may looks like:Thats because your header file does not define the module pointer, checkout any extension and you should see something like: extern zend_module_entry <myext>_module_entry; #define phpext_<myext>_ptr &<myext>_module_entryHello Kalle, thanks for your reply. My header file, stdafx.h, just contains these lines:
As for your config.w32, you should use ARG_[WITH|ENABLE] to add the ability to enable and disable the extension, especially if your planning to publish it somewhere. Example:I always need to enable the extension so I don't need that part. Regards, Eugenio