LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Missing C header files? (https://www.linuxquestions.org/questions/programming-9/missing-c-header-files-380666/)

kushalkoolwal 11-07-2005 12:23 AM

Missing C header files?
 
I am trying to compile a program and it gives me the following error:
Code:

install-debian.c:1108:22: error: sys/stat.h: No such file or directory
install-debian.c:1109:23: error: sys/types.h: No such file or directory
install-debian..c:1111:19: error: errno.h: No such file or directory
install-debian.c:1112:19: error: stdio.h: No such file or directory
install-debian.c:1113:20: error: stdlib.h: No such file or directory
install-debian.c:1114:20: error: string.h: No such file or directory
install-debian.c:1115:18: error: time.h: No such file or directory
install-debian.c:1116:20: error: unistd.h: No such file or directory
install-debian.c: In function 'key_with_file':
install-debian.c:1182: error: array type has incomplete element type
install-debian.c:1183: error: array type has incomplete element type
install-debian.c:1189: warning: incompatible implicit declaration of built-in function 'memset'
install-debian.c: In function 'chkenv':
install-debian.c:1234: warning: incompatible implicit declaration of built-in function 'sprintf'
install-debian.c:1235: warning: assignment makes pointer from integer without a cast
install-debian.c:1239: warning: incompatible implicit declaration of built-in function 'strlen'
install-debian.c:1243: w

I have installed gcc by apt-get install gcc . I am using the testing version. How can I install the header files?

Thanks

Mistro116@yahoo.com 11-07-2005 12:28 AM

This is my first time replying to another's question but i think i know your problem.

The "Header" files you are missing are in essence library files.

In other words, the libraries that come with C are built into your language and you just
need to declare them at the top of your class that you are compiling. I noticed ur missing
stdio.h and stdlib.h, just type:

Code:

#include <stdio.h>
#include <stdlib.h>

Let me know if this helps since im kinda curious.

Mistro116

kushalkoolwal 11-07-2005 12:42 AM

No that's not the problem because I can compile the program on my other debian system. Thanks for the effort though.

anyone?

Harmaa Kettu 11-07-2005 04:52 AM

Go to debian.org->Debian packages->Search the contents of packages
Search for some of the missing files (stdio.h for example). Choose the correct one from the list (it shouldn't be hard to identify) and install that package with apt-get.


All times are GMT -5. The time now is 08:46 PM.