LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 04-19-2005, 04:54 AM   #1
chanwing
Member
 
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.

eg

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

int main()
{
printf("test");
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

BUT

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
thx
 
Old 04-19-2005, 05:53 PM   #2
Mara
Moderator
 
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.
 
  


Reply


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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:20 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