PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.c > ubuntu and its C compiler
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
ubuntu and its C compiler

Réponse
 
LinkBack Outils de la discussion
Vieux 24/04/2008, 20h32   #1
Ix
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut ubuntu and its C compiler

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 â?~mainâ?T:

prova.c:6: warning: incompatible implicit declaration of built-in function
â?~printfâ?T




  Réponse avec citation
Vieux 24/04/2008, 20h47   #2
Walter Roberson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: ubuntu and its C compiler

In article <4810d1ed$0$40212$4fafbaef@reader5.news.tin.it>, Ix <x@x.x> wrote:
>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..


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
  Réponse avec citation
Vieux 24/04/2008, 20h50   #3
Antoninus Twink
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: ubuntu and its C compiler

On 24 Apr 2008 at 18:32, Ix wrote:
> 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..


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?


It's the Ubuntu developers you need to ask. Presumably they're
deliberately aiming their distro at people like your grandmother, rather
than programmers.

  Réponse avec citation
Vieux 24/04/2008, 20h51   #4
user923005
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: ubuntu and its C compiler

On Apr 24, 11:32am, "Ix" <x...@x.x> wrote:
> It seems not remember how to compile with gcc a C program in linux (ubuntu)


Herein we find the value of commercial Linux systems like Redhat or
Suse...
Technical support.

> how i have to compile this programme?
> It seems gcc doesn't find stdio.h..


Probably, your environment is goofed up.

> why is all antiintuitive?


Intuition is a poor way to program anyway. Check your environment. I
guess that your include path is wrong.

> Thank you and Good Morning


You're welcome.

> ---------------------------------------------------
> #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 â?~mainâ?T:
>
> prova.c:6: warning: incompatible implicit declaration of built-in function
> â?~printfâ?T


  Réponse avec citation
Vieux 24/04/2008, 21h23   #5
santosh
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: ubuntu and its C compiler

user923005 wrote:

> On Apr 24, 11:32am, "Ix" <x...@x.x> wrote:
>> It seems not remember how to compile with gcc a C program in linux
>> (ubuntu)

>
> Herein we find the value of commercial Linux systems like Redhat or
> Suse...
> Technical support.


Actually a range of support options are available for Ubuntu too, both
free and paid.

<http://www.ubuntu.com/support>

The problem is that the default Ubuntu install does not include any
packages for programming. You need to install a range of packages
manually to start programming. The OP will be better off asking in the
Ubuntu forums.

<http://www.ubuntu.com/support/community/webforums>
<http://www.ubuntu.com/support/community/locallanguage>

  Réponse avec citation
Vieux 24/04/2008, 22h13   #6
Rui Maciel
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: ubuntu and its C compiler

On Thu, 24 Apr 2008 20:32:04 +0200, Ix wrote:

> It seems not remember how to compile with gcc a C program in linux
> (ubuntu)


<snip />

Have you installed the build-essencials package?


Rui Maciel
  Réponse avec citation
Vieux 24/04/2008, 22h55   #7
Jensen Somers
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: ubuntu and its C compiler

Ix wrote:
> 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 â?~mainâ?T:
>
> prova.c:6: warning: incompatible implicit declaration of built-in function
> â?~printfâ?T
>
>
>
>


This should normally be asked on the Ubuntu mailing lists or Ubuntu forums.
However, I find the easiest way to have all things concerning C and C++
development is to install the packaged "build-essential" via synaptic or command
line. This should pack all header files and tools.

- Jensen
  Réponse avec citation
Vieux 25/04/2008, 02h32   #8
Tomás Ó hÉilidhe
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: ubuntu and its C compiler


> prova.c:3:20: error: stdio.h: Nessun file o directory



I had this problem before; I remedied it with:

apt-get install gcc
  Réponse avec citation
Vieux 25/04/2008, 10h20   #9
sophia
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: ubuntu and its C compiler

On Apr 24, 11:32pm, "Ix" <x...@x.x> wrote:
> 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 â?~mainâ?T:
>
> prova.c:6: warning: incompatible implicit declaration of built-in function
> â?~printfâ?T


see this :-

http://ubuntuforums.org/showthread.php?t=466389
  Réponse avec citation
Vieux 25/04/2008, 21h52   #10
Sri Harsha Dandibhotla
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: ubuntu and its C compiler

On Apr 25, 5:32 am, Tomás Ó hÉilidhe <t...@lavabit.com> wrote:
> > prova.c:3:20: error: stdio.h: Nessun file o directory

>
> I had this problem before; I remedied it with:
>
> apt-get install gcc


she already has gcc installed.. or it wouldnt even give the error in
the first place.
installing libc6 and libc-dev should be enough I think.
  Réponse avec citation
Vieux 25/04/2008, 22h18   #11
Ix
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: ubuntu and its C compiler


"Antoninus Twink" <nospam@nospam.invalid> ha scritto nel messaggio
news:slrng11liq.flc.nospam@nospam.invalid...
> On 24 Apr 2008 at 18:32, Ix wrote:
>> 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..

>
> I belive by default Ubuntu doesn't install any development files
> whatsoever.
>
> apt-get install libc6-dev
> would be a good first step...


this is the only step all right
"apt-get install gcc"
install only gcc not its library

very good you in 3 words have solve the problem
thank you



  Réponse avec citation
Vieux 30/04/2008, 13h24   #12
Tomás Ó hÉilidhe
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: ubuntu and its C compiler

On Apr 25, 8:52pm, Sri Harsha Dandibhotla <harsha....@gmail.com>
wrote:

> > apt-get install gcc

>
> she already has gcc installed.. or it wouldnt even give the error in
> the first place.
> installing libc6 and libc-dev should be enough I think.



I know, but obviously it isn't installed fully/correctly.

I think I might have also tried:

apt-get install g++

because it gets in all the files you want.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 23h48.


Édité par : vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,15459 seconds with 20 queries