ubuntu及其C编译器 [英] ubuntu and its C compiler
问题描述
似乎不记得如何在linux下用gcc编译一个C程序(ubuntu)
我怎么编译这个程序?
似乎gcc没有找到stdio.h ..
为什么都是反直觉?
谢谢你,早安
------------------------------------------- --------
#include< stdio.h>
int main(无效)
{
printf(" Ok \ n");
返回0;
}
--- ------------------------------------
io @ jjjj:/ home / name / Scrivania / Io $ gcc prova.c
prova.c:3:20:错误:stdio.h:Nessun文件o目录
prova.c:在函数中?~maina?T:
prova.c:6:警告:内置函数的不兼容隐式声明
a?~printfa?T
It seems not remember how to compile with gcc a C program in linux (ubuntu)
how i have to compile this programme?
It seems gcc doesn''t find stdio.h..
why is all antiintuitive?
Thank you and Good Morning
---------------------------------------------------
#include <stdio.h>
int main(void)
{
printf("Ok \n");
return 0;
}
---------------------------------------
io@jjjj:/home/name/Scrivania/Io$ gcc prova.c
prova.c:3:20: error: stdio.h: Nessun file o directory
prova.c: In function a?~maina?T:
prova.c:6: warning: incompatible implicit declaration of built-in function
a?~printfa?T
推荐答案
gcc prova.c
prova.c:3:20:错误:stdio.h:Nessun文件o dir ectory
prova.c:在函数中?~maina?T:
prova.c:6:警告:内置函数的不兼容隐式声明
a?~printfa?T
gcc prova.c
prova.c:3:20: error: stdio.h: Nessun file o directory
prova.c: In function a?~maina?T:
prova.c:6: warning: incompatible implicit declaration of built-in function
a?~printfa?T
文章< 48 ********* **************@reader5.news.tin.it> ;, Ix< x@x.xwrote:
In article <48***********************@reader5.news.tin.it>, Ix <x@x.xwrote:
> ;似乎不记得如何用linux中的gcc编译一个C程序(ubuntu)
>It seems not remember how to compile with gcc a C program in linux (ubuntu)
>我怎么编译这个程序?
>how i have to compile this programme?
It seems gcc doesn''t find stdio.h..
听起来你错过了安装一些文件或软件包。
有关您需要什么以及如何安装的信息,请参阅
a新闻组,该新闻组负责处理您的操作系统包装上的开发。
C标准中没有特定位置用于安装
这些文件(而stdio.y甚至不必是真正的文件根据系统管理员的突发奇想,安装它们的地点可能会有所不同。
- -
Allegories属于思想领域,遗骸是什么样的东西。 - Walter Benjamin
It sounds like you have missed installing some files or packages.
For information about what you need and how to install it, consult
a newsgroup that deals with development on your operating system packaging.
There is no particular location in the C standard for installing
these files (and stdio.y doesn''t even have to be a real file according
to the C standards), and the location for installing them can vary
according to the system administrator''s whims.
--
"Allegories are in the realm of thoughts, what ruins are in
the realm of things." -- Walter Benjamin
2008年4月24日18:32,Ix写道:
On 24 Apr 2008 at 18:32, Ix wrote:
似乎没有记得如何用linux编译一个C程序(ubuntu)
我怎么编译这个程序?
看来gcc没找到stdio.h ..
It seems not remember how to compile with gcc a C program in linux (ubuntu)
how i have to compile this programme?
It seems gcc doesn''t find stdio.h..
我默认相信Ubuntu没有安装任何开发文件
无论如何。
apt-get install libc6-dev
将是一个很好的第一步...
I belive by default Ubuntu doesn''t install any development files
whatsoever.
apt-get install libc6-dev
would be a good first step...
为什么所有的反直觉?
why is all antiintuitive?
这是你需要问的Ubuntu开发人员。据推测,他们故意将他们的发行版瞄准像你祖母这样的人,而不是程序员。
It''s the Ubuntu developers you need to ask. Presumably they''re
deliberately aiming their distro at people like your grandmother, rather
than programmers.
这篇关于ubuntu及其C编译器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!