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文件,导致了两次链接
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文件,导致了两次链接
相关文章推荐
- VC 编译 重复定义错误解决
- Android编译源码时出现的:<命令行>:0:0: 错误: “_FORTIFY_SOURCE”重定义 [-Werror]
- Android编译源码时出现的:<命令行>:0:0: 错误: “_FORTIFY_SOURCE”重定义 [-Werror]
- Linux下已编译PHP增加扩展so的方法,关键phpize 和config.m4
- linux学习--编译php出现错误 : configure: error: libpng.(a|so) not found.
- LINUX下PHP编译添加相应的动态扩展模块so(不需要重新编译PHP,以openssl.so为例)
- Android编译源码时出现的:<命令行>:0:0: 错误: “_FORTIFY_SOURCE”重定义 [-Werror]
- LINUX下PHP编译添加相应的动态扩展模块so(不需要重新编译PHP,以openssl.so为例)
- UBUNTU12.04编译Android源码<命令行>:0:0: 错误: “_FORTIFY_SOURCE”重定义 [-Werror] <命令行>::0:0: 错误: “_FORTIFY_SOUR
- 函数重复定义的编译错误,MSVCRTD.lib库和LIBCMTD.lib库重复定义函数
- PHP源码安装mcrypt扩展error: ‘PHP_FE_END’ undeclared here (not in a function)错误处理
- ubuntu11.10,32位操作系统,编译源码的时候出现一下错误
- ubuntu源码编译安装php常见错误解决办法
- 用apache的动态so模式编写和编译php扩展
- 编译Android源码和Linux内核源码时候遇到的一些错误
- CentOS 在编译php 的时候可能出现的错误以及需要安装的类库
- c写php扩展之编译php源码,创建扩展模块,编写扩展demo
- 防止头文件的重复包含和编译及重定义错误(ifndef/define/endif 用法)
- 编译php源码时,怎么加上自定义的一些扩展