当前位置: 技术问答>linux和unix
请教一个g++编译众出现的问题
来源: 互联网 发布时间:2014-12-27
本文导语: g++ -g -falign-functions=4 -DTEST_IMF -DDEBUG -o agent agent.o match_tree.o simp_match_tree.o imf_sub.o comm.o decode.o debug.o checksum.o spp_frag2.o ubi_BinTree.o ubi_SplayTree.o spp_stream4.o event.o codes.o proto_decode.o rules.o data_ops.o -lpcap -lpthr...
g++ -g -falign-functions=4 -DTEST_IMF -DDEBUG -o agent agent.o match_tree.o simp_match_tree.o imf_sub.o comm.o decode.o debug.o checksum.o spp_frag2.o ubi_BinTree.o ubi_SplayTree.o spp_stream4.o event.o codes.o proto_decode.o rules.o data_ops.o -lpcap -lpthread -I/usr/include/pcap
agent.o: In function `simp_match_tree::get_result_base(void)':
/home/tang/agent/match_def.h(.text+0xa2): undefined reference to `__builtin_new'
/home/tang/agent/match_def.h(.text+0xdf): undefined reference to `__builtin_delete'
/home/tang/agent/match_def.h(.text+0xec): undefined reference to `__builtin_new'
/home/tang/agent/match_def.h(.text+0x129): undefined reference to `__builtin_delete'
/home/tang/agent/match_def.h(.text+0x205): undefined reference to `__builtin_delete'
/home/tang/agent/match_def.h(.text+0x215): undefined reference to `__rethrow'
/home/tang/agent/match_def.h(.text+0x229): undefined reference to `__builtin_delete'
/home/tang/agent/match_def.h(.text+0x239): undefined reference to `__rethrow'
match_tree.o: In function `match_tree::~match_tree(void)':
/home/tang/agent/match_tree.cc:74: undefined reference to `__builtin_delete'
simp_match_tree.o: In function `simp_match_tree::~simp_match_tree(void)':
/home/tang/agent/simp_match_tree.cc:31: undefined reference to `__builtin_delete'
collect2: ld returned 1 exit status
make: *** [agent] Error 1
麻烦大侠看看 是哪个库除了问题
谢谢
agent.o: In function `simp_match_tree::get_result_base(void)':
/home/tang/agent/match_def.h(.text+0xa2): undefined reference to `__builtin_new'
/home/tang/agent/match_def.h(.text+0xdf): undefined reference to `__builtin_delete'
/home/tang/agent/match_def.h(.text+0xec): undefined reference to `__builtin_new'
/home/tang/agent/match_def.h(.text+0x129): undefined reference to `__builtin_delete'
/home/tang/agent/match_def.h(.text+0x205): undefined reference to `__builtin_delete'
/home/tang/agent/match_def.h(.text+0x215): undefined reference to `__rethrow'
/home/tang/agent/match_def.h(.text+0x229): undefined reference to `__builtin_delete'
/home/tang/agent/match_def.h(.text+0x239): undefined reference to `__rethrow'
match_tree.o: In function `match_tree::~match_tree(void)':
/home/tang/agent/match_tree.cc:74: undefined reference to `__builtin_delete'
simp_match_tree.o: In function `simp_match_tree::~simp_match_tree(void)':
/home/tang/agent/simp_match_tree.cc:31: undefined reference to `__builtin_delete'
collect2: ld returned 1 exit status
make: *** [agent] Error 1
麻烦大侠看看 是哪个库除了问题
谢谢
|
估计是没找到错误中所说函数对应的链接库,把LD_LIBRARY_PATH设上。如:
export LD_LIBRARY_PATH=你链接库所在位置。
export LD_LIBRARY_PATH=你链接库所在位置。
|
你自己的程序!
__builtin_xxxxx这些函数在那里定义的??
__builtin_xxxxx这些函数在那里定义的??
|
同意老猫,你的makefile是不是有问题呀?