c++ - PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) -


In the past I have created a shared library which I would now like to use it inside a php extension. Is it possible to do that? As I have seen in the config.m4 file PHP_NEW_EXTENSION () asks for the .cc problem, the problem is that I do not want to display my code. I just send headers and share I want to use the library which I have ordered under Ubuntu in C. For php extention I have created one: config.m4, php_c.h and php_c.cc.

Please help! While appreciating THX, I put it in the config file:

  libs = mylib.so; PHP_ADD_LIBRARY_WITH_PATH (Libs, $ EXTERNAL_LIB_DIR, ?? to add here);   

I get the following:

  PHP Warning: PHP startup: Invalid library (probably not a PHP library) '/ home / foder / mylib So unknown 'on line 0   

php: symbol lookup error: / usr / php5 / 20090626 + lfs / vehicles.so: undefined symbol: _ZN3CarC1Ei (where vehicles.so) is a php with the following: phpize, ./configure - enable-vehicle.

This message means that there is no "get_module" function in ".so".
Make sure the lines in the PHP extension source are:

  #ifdef HAVE_CONFIG_H #include "config" H "#endif   

and

  #ifdef COMPILE_DL_MYLIB ZEND_GET_MODULE (mylib) #endif    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -