/tmp/ccQ0q0g5.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' collect2: ld returne

Posted

技术标签:

【中文标题】/tmp/ccQ0q0g5.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0\' collect2: ld returned 1 exit status [重复]【英文标题】:/tmp/ccQ0q0g5.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status [duplicate]/tmp/ccQ0q0g5.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status [重复] 【发布时间】:2015-03-02 15:38:08 【问题描述】:

使用 Makefile 编译时出现错误

/tmp/ccQ0q0g5.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status

似乎缺少一些.so.a 文件,但是我如何知道这样的错误报告中缺少哪个文件?

生成文件:

CFLAGS = -Iinclude/
CFLAGS += -m32 
LDFLAGS = -Llib -llits -lrt -lpthread -Wl,-R,'lib'
server:server.cc
    gcc -o server $(CFLAGS) $(LDFLAGS) server.cc

【问题讨论】:

您的问题不是已经在副本中得到解答了吗?下次在这里提问之前做更好的研究! 重复的答案很容易找到,只需用谷歌搜索问题标题的重要部分:"undefined reference to `__gxx_personality_v0'" 那又如何?在参加 SO 之前,您可能想改进您的 google fu。 【参考方案1】:

您正在编译 C++,但没有链接到 C++ 运行时库。

使用g++ 链接C++ 程序,而不是gcc

(或者手动将-lstdc++添加到链接器命令中)。

【讨论】:

以上是关于/tmp/ccQ0q0g5.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' collect2: ld returne的主要内容,如果未能解决你的问题,请参考以下文章

.eh_frame 和 .eh_frame_hdr 部分究竟存储了啥?

Linux系统硬盘扩容

关于mongodb创建数据库后加入数据,数据库却为0g的问题

Dest0g3 520迎新赛 Writeup

Dest0g3 520迎新赛 Writeup

D0g3_Trash_Pwn_Writeup