您的位置:首页 > 编程语言 > PHP开发

php扩展在编译源码成so的时候,重复定义错误

2014-12-03 11:30 316 查看
group_comm_hero_hero_time_praise.o

g++ -shared -m32 -g -o lol_group_comm.so group_server.o lol_game_source.o lol_group_comm.o proto.o socket_client.o FriendRecommend.pb.o UuidAccountSvr.pb.o snssvr.pb.o datasvr_account.pb.o lol_dbproxy.pb.o hero_time.pb.o hero_time_recommend.pb.o group_comm_hero_hero_time.o group_comm_hero_hero_time_recommend.o group_comm_hero_hero_time_praise.o group_comm_hero_hero_time_praise.o -I/usr/local/include -I/data/xingzheng/install/php-5.2.14/include/php -I/data/xingzheng/install/php-5.2.14/include/php/main -I/data/xingzheng/install/php-5.2.14/include/php/TSRM -I/data/xingzheng/install/php-5.2.14/include/php/Zend -I/data/xingzheng/install/protobuf-2.4.1/include -I. -I./TCrsSvcProto -I./QtSvr -L/usr/local/lib -rdynamic -lstdc++ -L/data/xingzheng/install/protobuf-2.4.1/lib /usr/local/lib/libprotobuf.a

group_comm_hero_hero_time_praise.o: In function `zif_hero_time_praise_getherotimepraisereq(int, _zval_struct*, _zval_struct**, _zval_struct*, int)':

/data/xingzheng/software/new_extend/lol_group_comm/group_comm_hero_hero_time_praise.cpp:130: multiple definition of `zif_hero_time_praise_getherotimepraisereq(int, _zval_struct*, _zval_struct**, _zval_struct*, int)'

group_comm_hero_hero_time_praise.o:/data/xingzheng/software/new_extend/lol_group_comm/group_comm_hero_hero_time_praise.cpp:130: first defined here

group_comm_hero_hero_time_praise.o: In function `zif_hero_time_praise_setherotimepraisereq(int, _zval_struct*, _zval_struct**, _zval_struct*, int)':

/data/xingzheng/software/new_extend/lol_group_comm/group_comm_hero_hero_time_praise.cpp:7: multiple definition of `zif_hero_time_praise_setherotimepraisereq(int, _zval_struct*, _zval_struct**, _zval_struct*, int)'

group_comm_hero_hero_time_praise.o:/data/xingzheng/software/new_extend/lol_group_comm/group_comm_hero_hero_time_praise.cpp:7: first defined here

collect2: ld returned 1 exit status

make: *** [lol_group_comm.so] Error 1

这种错误一般是在编译命令的时候重复添加了一个.o文件,导致了两次链接
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐