LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 06-30-2015, 12:53 AM   #1
kikilinux
Member
 
Registered: Sep 2012
Posts: 125

Rep: Reputation: Disabled
Question 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 ?
 
Old 06-30-2015, 12:57 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,692

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
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?
 
Old 06-30-2015, 01:29 AM   #3
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,900

Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
include file error

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

google.com
 
1 members found this post helpful.
Old 06-30-2015, 11:50 PM   #4
kikilinux
Member
 
Registered: Sep 2012
Posts: 125

Original Poster
Rep: Reputation: Disabled
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.
 
Old 07-01-2015, 05:46 AM   #5
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
But this is a wrong practice. This might create a unknown bug.
 
1 members found this post helpful.
  


Reply

Tags
compile error, includes


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can tar accept an "include file" (as opposed to an include pattern)? digitalformula Linux - Newbie 1 01-24-2013 09:18 AM
[SOLVED] Tar using include-file and exclude file one liner? metallica1973 Linux - Server 5 10-20-2011 02:25 PM
Device Driver Make file include .s and .c file raghu2383 Programming 0 12-07-2009 08:26 PM
tar.gz file did not include install file |Spec-ops Linux - Newbie 12 11-17-2005 08:25 AM
#include file Cynthia Blue Linux - Newbie 6 03-31-2003 06:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 09:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration