gcc compilation problem
when i tried to compile this program using gcc in kubuntu 8.04 I got this error message..........Plz help.
PROGRAM #include<sys/types.h> #include<fcntl.h> #include<sys/stat.h> int main(int argc,char *argv[]) { int fdold,fdnew,count; char buffer[100]; fdold=open(argv[1],O-RDONLY); fdnew=creat(argv[2],0777); do{ count=read(fdold,buffer,1); write(fdnew,buffer,1); } while(count!=0); } ERROR copy.c:1:22: error: sys/types.h: No such file or directory copy.c:2:18: error: fcntl.h: No such file or directory copy.c:3:21: error: sys/stat.h: No such file or directory copy.c: In function âmainâ: copy.c:8: error: âOâ undeclared (first use in this function) copy.c:8: error: (Each undeclared identifier is reported only once copy.c:8: error: for each function it appears in.) copy.c:8: error: âRDONLYâ undeclared (first use in this function) |
Quote:
'apt-get libc6-dev' will do. Good Luck. |
I recommend installing the build-essentials package which will give you a lot of the developing tools needed.
|
All times are GMT -5. The time now is 04:12 PM. |