RE: [PECL-DEV] undefined symbol issue related to sharing a global among source files
[email protected] ("John Hayes") Thu, 13 May 2010 15:42:01 -0400
| Newsgroups | php.pecl.dev |
|---|---|
| Message-ID | <00a101caf2d4$5bde14f0$139a3ed0$@com> |
Thanks Mark, that was exactly what I needed to know. -----Original Message----- From: M. Karpelès [mailto:[email protected]] Sent: Thursday, May 13, 2010 3:10 PM To: John Hayes Cc: [email protected] 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