免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2520 | 回复: 5
打印 上一主题 下一主题

[C++] cannot execute binary file [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-11-22 16:00 |只看该作者 |倒序浏览
[root@test src]# g++ -DHAVE_CONFIG_H -I. -I. -I..  -g -O2 -Wall  -c fbgetch.cc -o fbgetch.o

[root@test src]# gdb fbgetch.o

GNU gdb Red Hat Linux (6.3.0.0-1.132.EL4rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) r
Starting program: /tmp/qe-0.2.0/src/fbgetch.o
/bin/bash: /tmp/qe-0.2.0/src/fbgetch.o: cannot execute binary file
/bin/bash: /tmp/qe-0.2.0/src/fbgetch.o: Success

Program exited with code 01.
warning: shared library handler failed to enable breakpoint
You can't do that without a process to debug.

论坛徽章:
3
2015年迎新春徽章
日期:2015-03-04 09:56:11数据库技术版块每日发帖之星
日期:2016-08-03 06:20:00数据库技术版块每日发帖之星
日期:2016-08-04 06:20:00
2 [报告]
发表于 2007-11-22 16:09 |只看该作者
我晕

论坛徽章:
0
3 [报告]
发表于 2007-11-22 16:17 |只看该作者
刚开始玩没有经验,能不能给点建议或意见????

论坛徽章:
3
2015年迎新春徽章
日期:2015-03-04 09:56:11数据库技术版块每日发帖之星
日期:2016-08-03 06:20:00数据库技术版块每日发帖之星
日期:2016-08-04 06:20:00
4 [报告]
发表于 2007-11-22 16:24 |只看该作者
不是可执行文件,你怎么调啊?

论坛徽章:
0
5 [报告]
发表于 2007-11-22 16:32 |只看该作者
-o 的参数不是生成可执行文件的吗?    gcc -g -o a a.c不就是这样的吗?

论坛徽章:
0
6 [报告]
发表于 2007-11-22 16:45 |只看该作者
你莫带 -c  这个参数
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP