其实就是一个问题,gcc只能编译.c文件,你如果取名为.cpp,那么gcc编译就会就会出现这个错误。

这种情况下:

1.用g++编译(.c 或.c++都可以编译)

2.仍用gcc编译,但是文件后缀改为.c

tmp/ccdLyHub.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status的更多相关文章

  1. undefined reference to `pthread_create' collect2: ld returned 1 exit status

    问题原因:    pthread 库不是 Linux 系统默认的库,连接时需要使用静态库 libpthread.a,所以在使用pthread_create()创建线程,以及调用 pthread_atf ...

  2. [CentOS]CentOS下编译CPP文件时报错[undefined reference to `__gxx_personality_v0' collect2: ld]的解决办法

    在CentOS环境下编译CPP时报出 undefined reference to `__gxx_personality_v0' collect2: ld 以上错误,调查了一下,加上参数[-lstdc ...

  3. error: ld returned 1 exit status 和 error:undefined reference

    undefined reference 往往是链接时出现错误,无法解析引用.这篇文章总结的很好undefined reference问题总结 error: ld returned 1 exit sta ...

  4. moc_XXXX.o:(.data.rel.ro._ZTI12CalculatorUI[_ZTI12CalculatorUI]+0x10): undefined reference to `typeinfo for QWidget' collect2: error: ld returned 1 exit status make: *** [Makefile:144: myCalculator]

    main.cpp:(.text.startup+0x22): undefined reference to `QApplication::QApplication(int&, char**, ...

  5. (.text+0x12): undefined reference to `rpl_fprintf'

    问题1:(.text+0x12): undefined reference to `rpl_fprintf'解决办法:在yacc前面添加%{#undef yyerrorvoid yyerror (ch ...

  6. 错误:undefined reference to `__gxx_personality_v0'

    使用gcc编译C代码,引用了C++ 库,出现这个错误,网上搜到这哥们的文章,解决问题 转自:错误:undefined reference to `__gxx_personality_v0' 1. Li ...

  7. C++(2):错误:undefined reference to `__gxx_personality_v0'

    1. Linux Develop Notes     * 编译 c++ 程序需要添加 -lstdc++   sample: gcc -lstdc++ -o test test.c,否则会报 " ...

  8. "undefined reference to" 问题解决方法 -链接问题

    最近在Linux下编程发现一个诡异的现象,就是在链接一个静态库的时候总是报错,类似下面这样的错误: (.text+0x13): undefined reference to `func' 关于unde ...

  9. [转]undefined reference问题总结

    转自http://ticktick.blog.51cto.com/823160/431329 最近在Linux下编程发现一个诡异的现象,就是在链接一个静态库的时候总是报错,类似下面这样的错误: (.t ...

随机推荐

  1. 02_python基础(面向对象编程)

    面向对象编程: 把一组数据结构和处理它们的方法组成对象(object),把相同行为的对象归纳为类(class),通过类的封装(encapsulation)隐藏内部细节,通过继承(inheritance ...

  2. 纯C语言实现链栈

    #include <stdio.h> #include <stdlib.h> typedef int ElemType; typedef struct StackNode{ E ...

  3. 基于vue+springboot+docker网站搭建【九】负载均衡

    后台mall-admin 负载均衡 1.新启动一个mall-admin docker实例 docker run -p 9002:9001 --name mall-admin-9002 --link m ...

  4. PHP获得毫秒数

    因为前端需要写函数处理时间戳,比较麻烦,所以我们有的时候,需要接口传递毫秒数给前端. 下面可以通过这个函数来获得毫秒数 <?php function getMillisecond() { lis ...

  5. CentOS7 vsftp 安装与配置(视频教程)

    (双击全屏播放) 1.安装vsftpd yum install -y vsftpd 2.编辑ftp配置文件 vi /etc/vsftpd/vsftpd.conf anonymous_enable=NO ...

  6. 开发技术--Python核心知识A

    开发|Python核心知识A A篇,主要介绍Python基础中列表,元祖,字典,集合,字符串,I/O,条件与循环,异常处理的底层知识与使用的注意事项. 希望大家对于Python会有新的收获,本篇不同于 ...

  7. 场sharepoint2016数据库恢复站点

    前不久公司support方,不小心把IIS的应用删除了,算是灼急了,不过有过原来恢复的经历,似乎有了心理准备,可是这次比上次严重些.技术操作复杂些,不过通过此事,也是进一步了解了SP2016数据库结构 ...

  8. Qt导航栏 QListWidget

    使用Qt Designer 使用QListWidget控件 设置样式 QListWidget::item { min-height: 30px; /*设置item高度*/ border-style: ...

  9. vue全家桶项目应用断断续续的记录

    一.引用axios插件报错 axios使用文档 Cannot read property 'protocol' of undefined 解决方法:在mainjs文件中把axios引入vue的原型函数 ...

  10. LSB MSB

    #LSB:(Least Significant,Bit) 最低有效位 :MSB(Most Significant Bit):最高有效位,若MSB=1,则表示数据为负值,若MSB=0则表示数据为正. 在 ...