Re: [PECL-DEV] undefined symbol issue related to sharing a global among source files

[email protected] ("M." Karpelès) Fri, 14 May 2010 04:09:57 +0900
Newsgroups php.pecl.dev
Organization ooKoo.org
Message-ID <1273777797.921.24396.camel@localhost>
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