LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   include file error (https://www.linuxquestions.org/questions/centos-111/include-file-error-4175546782/)

kikilinux 06-30-2015 12:53 AM

include file error
 
I have problem with include files when compiling a source code.
The problem is some include files which are located in /usr/src/kernels/3.10.../include/linux/list.h cannot be find while compiling my source code.
When I copy the list.h file into /usr/include/... the error is disappear but another include file make error.
the error is : fatal error: linux/list.h no such file or directory.

OS: CentOS 7, 64bits run on virtualbox virtual machine.

How can I correct this error ?

pan64 06-30-2015 12:57 AM

Not enough information to say anything. Have you installed the kernel dev package?
What did you try to compile and how? What other files were missing?

mralk3 06-30-2015 01:29 AM

include file error
 
Install the kernel headers, done. The CentOS documentation will explain how to do this.

google.com

kikilinux 06-30-2015 11:50 PM

Thanks to answers
The problem by copying list.h from redhat 6 (/usr/include/list.h) to my centos 7 same directory fixed.
It's not a good solution but it fixed the problem now.
If i encounter a new problem I take it here to do best solution to go away same errors.

veerain 07-01-2015 05:46 AM

But this is a wrong practice. This might create a unknown bug.


All times are GMT -5. The time now is 03:54 AM.