Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 07-12-2011, 08:12 AM   #1
Registered: May 2006
Location: Bayern, Germany
Distribution: Many
Posts: 224

Rep: Reputation: 41
Which version.h is being used ?

I have a machine which came with the kernel 2.6.18, I've compiled from source a newer kernel (2.6.35) because the patches I'm working on are intended for that version.
I have several of lines like this:
#include <linux/version.h>
These values are defined in version.h but how can I tell to (or know if it) use /opt/kernel/linux-2.6.35/include/linux/version.h instead of /usr/include/linux.version.h (which is 2.6.18) ?

Or am I missing some step related to kernel upgrade ?
Old 07-12-2011, 12:16 PM   #2
Registered: Oct 2009
Distribution: Fedora, HPUX
Posts: 31

Rep: Reputation: 2
See this post. Basically the .h file located first in your include path is used.

I *believe* you can use `gcc -v` to see your include path but I forget and don't have access to gcc compiler where I am right now.
Old 07-13-2011, 05:57 AM   #3
Registered: May 2009
Location: Chelmsford, England
Distribution: OpenSuse 12.2 and 13.2, Leap 4.2
Posts: 120

Rep: Reputation: 24
I suggest you read the file \usr\include\linux\version.h ; it appears to tell you what to do.


driver, kernel

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Regarding distribution + kernel version + gcc version + glib version. JCipriani Linux - General 8 04-19-2008 02:54 PM
Xfree Error (EE) module ABI minor version (7) is newer than the server's version (6) jimdaworm Slackware 0 10-17-2003 05:26 PM
Xfree prob radeon.o kernel module version is 1.1.1 but version 1.5.0 or newer needed. jimdaworm Slackware 0 10-01-2003 06:27 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:05 PM.

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