This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Unable to compile a simple C program... Please Help!

I have pasted the source file and the error log below
that contains the error message displayed when I
invoke 'gcc' to compile this file.

sample.c: (source file)

#include <stdio.h>
void main()
    printf("Hello World!\n");

error log:

Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--prefix=/usr --enable-shared --with-system-zlib
--libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit
--enable-clocale=gnu --enable-libstdcxx-debug
--enable-mpfr --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
 /usr/lib/gcc/i486-linux-gnu/4.1.2/cc1 -E -quiet -v
sample.c -mtune=generic -fpch-preprocess -o sample.i
ignoring nonexistent directory
ignoring nonexistent directory
ignoring nonexistent directory
#include "..." search starts here:
#include <...> search starts here:
End of search list.
sample.c:1:19: error: stdio.h: No such file or

P.s. I'm a newbie to linux and as such i might not
understand the technical jargons used by you experts.
Please get down to earth to help me out. I'm falling
in love with linux but do not want to disappoint
myself with such troubles.

      Get the freedom to save as many mails as you wish. To know how, go to

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]