PHP Warning: PHP Startup: Unable to load dynamic library: /home/lib.so so: undefined symbol: __gxx_personality_v0 in Unknown on line 0
i've managed to succesfully create a开发者_运维技巧n .php extension. I would like to move further. Insted of using the .cc that i want my .php to link with i would like to add the library.so. When compiling i have this error.
how to solve it?
thx. appreciate
EDIT:
I succed to compile it. now i have this error: undefined symbol: _ZN3CarC1Ei. why? it is true i did not add the .cc code. how to add iin config.m4 the .so file that contans the .h and .cc with which i wpuld like to work from php?
I guess you need to link with libstdc++
. Or compile with g++
instead of gcc
, then libstdc++
will be linked by default.
Apparently your extension has been compiled with g++ and you didn't linked the stdc++ library. You need to add something like this in config.m4:
PHP_SUBST(YOUREXT_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(stdc++, "", YOUREXT_SHARED_LIBADD)
See here for an exemple: http://svn.php.net/viewvc/pecl/rar/trunk/config.m4?revision=299933&view=markup
精彩评论