Re: Third Party lib.so
| From: | Garry Taylor | Date: | Thu, 05 May 2011 15:41:55 +0000 |
| Subject: | Re: Third Party lib.so | ||
| References: | 1 2 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-8222@lists.php.net to get a copy of this message | ||
On 05/05/2011 16:08, Mikko Koppanen wrote:
On Thu, May 5, 2011 at 3:31 PM, Garry Taylor<giz@gbdesign.net> wrote:*Error When calling page that run "hello_world();"* /usr/local/bin/php-cgi: symbol lookup error: /usr/local/lib/php/extensions/debug-non-zts-20090626/hello.so: undefined symbol: GetPostcode *config.m4* PHP_ARG_ENABLE(hello, whether to enable Hello World support, [ --enable-hello Enable Hello World support]) PHP_ADD_INCLUDE("/home/gizard/paf-pcpplus/pcplus/lib/") if test "$PHP_HELLO" = "yes"; then PHP_ADD_LIBRARY(pcplib, 1, PCPLIB_SHARED_LIBADD) AC_DEFINE(HAVE_HELLO, 1, [Whether you have Hello World]) PHP_NEW_EXTENSION(hello, hello.c, $ext_shared) fi I have run: make clean make then copied the new extension into /usr/local/lib/php/extensions/debug-non-zts-20090626/hello.so One this I have noticed is that the external lib I am trying to include is a pcplib.o file and now pbplib.so (Does this make a difference) The Include file is not in the standard directory so I have used PHP_ADD_INCLUDE to include the correct folder (Is this the right way) The third parameter to PHP_ADD_LIBARARY is a mistery to me (What should I put here) PS the "http://lxr.php.net/search?q=PHP_ADD_LIBRARY&project=PECL&defs=&refs=&path=&hist=" link rocks!!!I am making the assumption that the error relates to the extension not including the third party lib as GetPostcode is a method of this lib. My question is how do I include the third party lib to compile into the extension? I have search the PECL source, edited the M4 config and I have even phoned Zend but got shot down and told to look here :(Hi, most likely you need PHP_ADD_LIBRARY in your config.m4. You can check examples from just about any PECL extension that is using third-party libraries: http://svn.php.net/viewvc/pecl/ Ok, I am getting the same problem but this will be because I have done it wrong.. I don't understand the PHP_ADD_LIB method so I am just hacking at it at the moment. Here is what I have.