|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
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. |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
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> |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
> prova.c:3:20: error: stdio.h: Nessun file o directory I had this problem before; I remedied it with: apt-get install gcc |
|
|
|
#9 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#10 |
|
Messages: n/a
Hébergeur: |
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. |
|
|
|
#11 |
|
Messages: n/a
Hébergeur: |
"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 |
|
|
|
#12 |
|
Messages: n/a
Hébergeur: |
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. |
|
![]() |
| Outils de la discussion | |
|
|