测试PHP扩展运行错误

来源:互联网 发布:八爪鱼数据采集 编辑:程序博客网 时间:2024/06/06 04:56
[root@iZ23yjelafgZ home]# php test.php 

PHP Warning:  PHP Startup: Unable to load dynamic library '/home/bdVideo.so' - /home/bdVideo.so: undefined symbol: _ZTVN10__cxxabiv120__si_class_type_infoE in Unknown on line 0



As my jni library is managed by autotools, after adding "-Wl,--gc-sections -fPIC -shared -lstdc++" to AM_LDFLAGS of Makefile.am problems sloves. libstdc++ might not necessary if code is compiled by a c++ compiler (e.g. g++).


I add -Wl,--gc-sections -fPIC -shared -lstdc++ to LDFLAGS

0 0
原创粉丝点击