cannot compile c programs
I used gcc to compile my c program.However it gives an error of not including <stdio.h> and other library files.Please guide me.
|
What exactly is the error? Did you include stdio?
|
yes i included <stdio.h> and <conio.h> in my c program.I used this statement in the program
#include <stdio.h> #include <conio.h> error:stdio.h:No such file or directory |
Interesting, what if you add the "-I /usr/include" option to gcc?
|
I want to know how to include the c library files in my c program and sucessfully run it.
I had included in my c program as #include <stdio.h> #include <conio.h> .I edited my file in vi editor.I would like to know how linux can recognise my c library functions.I am using fedora core 3.Is it that some packages I have not installed. |
Try "gcc -I /usr/include -o outfile yourfile"
If that doesn't work, search your system for the file "stdio.h" |
conio.h is typically NOT used in linux/*nix
|
In fact, conio.h is the interface to a DOS console library -- not ANSI C or POSIX at all. Look into ncurses if you're looking for similar functionality on *nix.
|
All times are GMT -5. The time now is 03:42 AM. |