Re: Third Party lib.so

From: Date: Fri, 06 May 2011 09:06:49 +0000
Subject: Re: Third Party lib.so
References: 1 2 3 4  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-8226@lists.php.net to get a copy of this message
On 05/05/2011 17:53, Mikko Koppanen wrote:
On Thu, May 5, 2011 at 4:41 PM, Garry Taylor<giz@gbdesign.net> wrote:
*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
Hi, the following should work: 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, HELLO_SHARED_LIBADD) AC_DEFINE(HAVE_HELLO, 1, [Whether you have Hello World]) PHP_NEW_EXTENSION(hello, hello.c, $ext_shared) PHP_SUBST(HELLO_SHARED_LIBADD) fi PHP_SUBST is defined here: http://lxr.php.net/opengrok/xref/PHP_5_3/acinclude.m4#85 Hi thanx for the info.. I have just realised that the lib is a pcplib.o and not a shared object pcplib.so (uuppps :D). Can you give any pointers as to how I can include the "LSB relocatable" pcplib.o file.
Ps I have done the above and got the following error: debian:/home/gizard/PHP/php-5.3.6/ext/hello# make /bin/sh /home/gizard/PHP/php-5.3.6/ext/hello/libtool --mode=link cc -DPHP_ATOM_INC -I/home/gizard/PHP/php-5.3.6/ext/hello/include -I/home/gizard/PHP/php-5.3.6/ext/hello/main -I/home/gizard/PHP/php-5.3.6/ext/hello -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/home/gizard/paf-pcpplus/pcplus/lib/ -DHAVE_CONFIG_H -g -O0 -o hello.la -export-dynamic -avoid-version -prefer-pic -module -rpath /home/gizard/PHP/php-5.3.6/ext/hello/modules hello.lo -lpcplib cc -shared .libs/hello.o -lpcplib -Wl,-soname -Wl,hello.so -o .libs/hello.so */usr/bin/ld: cannot find -lpcplib* collect2: ld returned 1 exit status make: *** [hello.la] Error 1

« previous php.pecl.dev (#8226) next »