RE: [PECL-DEV] undefined symbol issue related to sharing a global among source files
| From: | John Hayes | Date: | Thu, 13 May 2010 19:42:01 +0000 |
| Subject: | RE: [PECL-DEV] undefined symbol issue related to sharing a global among source files | ||
| References: | 1 2 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-7227@lists.php.net to get a copy of this message | ||
Thanks Mark, that was exactly what I needed to know.
-----Original Message-----
From: M. Karpelès [mailto:karpeles@ookoo.org]
Sent: Thursday, May 13, 2010 3:10 PM
To: John Hayes
Cc: pecl-dev@lists.php.net
Subject: Re: [PECL-DEV] undefined symbol issue related to sharing a global among source files
Le jeudi 13 mai 2010 à 14:37 -0400, John Hayes a écrit :
>
> - category_ce and category_object_handlers are declared in
> php_category.h:
> extern zend_class_entry *category_ce;
> extern zend_object_handlers category_object_handlers;
>
> - both php_category.cpp and php_getgraph.h #include "php_category.h"
You need to define those two variables as non extern somewhere.
For example on top of your php_category.cpp file add:
zend_class_entry *category_ce;
zend_object_handlers category_object_handlers;
If you don't do that, the variables will not exist in your binary file.
Mark
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.819 / Virus Database: 271.1.1/2855 - Release Date: 05/13/10 02:26:00