F
foodic
Hi all
I have a little bit of programming experience on windows 98 using C.
But this is my first attempt to compile a program on
Linux using gcc.I have two files s1.c and s1.h and while
compiling i am getting compilation problem,
here is the content of s1.c
#include <stdio.h>
#include <s1.h>
void hi();
int main(){
hi();
}
here is the content of s1.h
void hi(){
printf ("Hi all\n");
}
when i compile this program,
gcc s1.c
it gives error like,
s1.c:2:16: s1.h: No such file or directory
and also i have tried
gcc s1.h s1.c
it gives error like,
gcc: compilation of header file requested
s1.c:2:16: s1.h: No such file or directory
Please somebody explain how to compile it
thanks
divya
I have a little bit of programming experience on windows 98 using C.
But this is my first attempt to compile a program on
Linux using gcc.I have two files s1.c and s1.h and while
compiling i am getting compilation problem,
here is the content of s1.c
#include <stdio.h>
#include <s1.h>
void hi();
int main(){
hi();
}
here is the content of s1.h
void hi(){
printf ("Hi all\n");
}
when i compile this program,
gcc s1.c
it gives error like,
s1.c:2:16: s1.h: No such file or directory
and also i have tried
gcc s1.h s1.c
it gives error like,
gcc: compilation of header file requested
s1.c:2:16: s1.h: No such file or directory
Please somebody explain how to compile it
thanks
divya