C programs



I write in ANSI C and the gcc on Ubuntu 1.7 doesn't like it. Here is
the source code:

/* converts 2 fathoms to feet */
#include <stdio.h>
int main (void)
{
int feet, fathoms;

fathoms = 2;
feet = 6 * fathoms;
printf("There are %d feet in %d fathems!\n", feet, fathoms);
return 0;
}

When I run gcc it errors out with:

karl@karl-desktop:~/Cprog$ gcc fathm_ft.c
fathm_ft.c:2:19: error: stdio.h: No such file or directory

Now it can't find stdio.h and why is that?

I thought stdio.h is a standard C header.

Karl

--

Karl F. Larsen, AKA K5DI
Linux User
#450462 http://counter.li.org.
PGP 4208 4D6E 595F 22B9 FF1C ECB6 4A3C 2C54 FE23 53A7


--
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users



Relevant Pages

  • Re: C programs Solved
    ... int feet, fathoms; ... You do not have the libc6-dev package installed. ... package from the C compiler. ...
    (Ubuntu)
  • Re: C programs
    ... int feet, fathoms; ... You do not have the libc6-dev package installed. ...
    (Ubuntu)
  • Re: C programs
    ... int main (void) ... int feet, fathoms; ...
    (Ubuntu)
  • Re: C programs
    ... int main (void) ... int feet, fathoms; ...
    (Ubuntu)
  • Re: A correct "mojave" experiment for Vista
    ... even made it 10 feet off the launch pad if Microsoft wrote the OS ... The OS does little in that first 10 feet. ... And with the money saved...Congress will all embark on trips to Switzerland, Africa and any other vacation site they can dream up to get "ubuntu training". ... Using what the government does as an example of intelligence doesn't really fly. ...
    (microsoft.public.windows.vista.general)