I'm trying to compile a program with this gcc command:
gcc -c -fomit-frame-pointer -O2 sth.c
These header files are included:
#include <linux/kernel.h> //line 1
#include <linux/module.h> //line 2
#include <sys/syscall.h> //line 3
#include <linux/proc_fs.h> //line 4
#include <linux/types.h> //line 5
#include <linux/dirent.h> //line 6
#include <asm/unistd.h> //line 7
I get "no such file or directory" error for line 2,4 and 6 though they are located in /usr/src/kernels/3.10.14-100.fc18.x86_64/include/linux/ just as the other 4.
I've compiled some other programs whitch include kernel header files on this system before (using Makefiles) (fedora 18) before and I'm sure for example it didn't get such error for dirent.h or proc_fs.h.
I think maybe I should use some other options with gcc that maybe was considered in those Makefiles!
kernel-headerfiles and kernel-devel package of the same version of my running kernel is installed.