In the past, I created a shared library, which now I would like to use it inside the php extension. Can this be done? As I saw in the config.m4 file PHP_NEW_EXTENSION() , .cc is requested. The problem is that I do not want to expose my code. I just want to use the header and shared library that I created in c under ubuntu. For the php extension, I created: config.m4, php_c.h and php_c.cc.
Please, help!. thanks APPRECIATE I put in the configuration file:
libs=mylib.so; PHP_ADD_LIBRARY_WITH_PATH(libs, $EXTERNAL_LIB_DIR, ?? what to add here);
I get the following:
PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) '/home/foder/mylib.so'in Unknown on line 0
php: character search error:
/usr/php5/20090626+lfs/vehicles.so: undefined symbol: _ZN3CarC1Ei (where vehicles.so) is a php so created with: phpize, ./configure --enable-vehicle make..
c ++ php ubuntu php-extension
sunset
source share