Review your favorite Linux distribution.
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 04-19-2005, 03:54 AM   #1
Registered: Feb 2005
Posts: 42

Rep: Reputation: 15
Unhappy RedHat 9.2 compiling problem

I am using the RedHat 9.2 to write program.
But when I include a timer.h file of the /usr/include/linux, it always has error.


#vi t.c
#include <linux/timer.h>
#include <stdio.h>

int main()
return 0;
#gcc -DLINUX -O2 -march=i486 -Wall -I/usr/include -o t.o -c t.c

lots of warning and error occur about the timer.h


when I use the RedHat 7.0
it still has problem but I use the other path

#gcc -DLINUX -O2 -m486 -Wall -I/usr/src/linux/include -c t.c

there is no problem

is it the compiling problem in RedHat 9.2?
or is it the usr/include/linux I can't use?
Can anyone help me to solve this problem?
THank Lots
Old 04-19-2005, 04:53 PM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
In the code you provide you don't need timer.h at all. I understand you need a function (one or more) from that header file. What are they? Maybe there's a better (newer) header with them, but it's hard to say without knowing more.

Be very careful when inluding /usr/include/linux. The files inside may change between versions. It's probably your case.


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
problem compiling kernel 2.6 on RedHat Ninja_212 Red Hat 210 07-17-2004 01:49 AM
Problem compiling Apache 2.0.49 + SSL 0.9.7a-20.2 on RedHat 9 Lunitari Linux - Software 4 05-21-2004 09:12 AM
Problem Compiling Nessus 2.0.7 on Redhat nimgnay Linux - Software 8 09-07-2003 08:32 PM
Compiling redhat 9.0 cholzsc1 Linux - Software 10 07-14-2003 06:50 PM
driver install problem. It's for redhat 6.2, but compiling in 7.3 hardigunawan Linux - Software 3 09-09-2002 07:01 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:59 AM.

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
Open Source Consulting | Domain Registration