GCC不生成输出文件 [英] GCC Doesn't produce output file

查看:1293
本文介绍了GCC不生成输出文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个gcc问题,我不知道为什么,一切都很好,直到今天,我想编译的东西,然后注意到,海湾合作委员会不会产生输出文件,我试过g ++,同样的问题发生,我删除gcc并使用pacman重新安装,因为我在archlinux上,但没有任何内容:(b / b>

例子:我运行这个简单的命令来编译一些东西:
gcc hello。 c

预计gcc会创建一个名为a.out的文件,但它不会,即使我指定了-o命令!!!!



我以为我的磁盘已满,但仍然是空的!!!!:($ / b
$ b

我在互联网上搜索,但我didn 't found something !!!



编辑:在hello.c中有一个简单的printf,而且gcc不会发出任何错误, p>

任何人遇到此问题并知道如何解决它? 在这一点上,没有额外的信息,很难说失败...



从你的描述中,我想你没有编译错误(或者尝试使用-Wall)。
如果您确信自己的代码,那么在您的情况下,我将以详细模式运行(gcc -v hello.c)并查看输出以了解具体情况。作为最后的手段,去寻找...


I have a problem on gcc and i don't know why, everything was fine till today, i wanted to compile something then noticed that gcc doesn't produce output file, i tried g++ and the same problem occurs, i deleted gcc and reinstall it using pacman cause i'm on archlinux, but nothing :(

example : i run this simple command to compile something : gcc hello.c

it's expected that gcc creates a file named a.out, but it doesn't, even if i specify -o command !!!!

i thought my disk is full, but is still empty !!!! :(

i searched on the internet but i didn't found something !!!

Edit: in hello.c there's a simple printf, and gcc doesn't signal any error it just terminate normaly with code 1

Anyone encounter this problem and know how to resolve it??

解决方案

At this point, without additional info, it's difficult to say what fails ...

From your description, I suppose you don't have compile errors (or try with -Wall). If you are sure of your code, then, in your situation, I would run in verbose mode (gcc -v hello.c) and look at the output to see what's up. As a last resort, go for strace ...

这篇关于GCC不生成输出文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆