Welcome to the most active Linux Forum on the web.
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 02-19-2006, 02:22 AM   #1
LQ Newbie
Registered: Feb 2006
Posts: 16

Rep: Reputation: 0
How to link to reference linux timer calls? Undefined --bad_delay for udelay()

I wrote a program on my pc, where I am trying to print a line every 3 seconds.
#include <stdio.h>
#include <string.h>
#include <asm/delay.h>

int main ()
printf ("Print this line every three seconds!!\n");
return 0;

I am getting a compile/link error saying that it cannot find --bad_udelay (which is reference in delay.h for my PC,

psullivan@linux:~> gcc homework1.c
/tmp/ccoWpKbA.o(.text+0xe1): In function `main':
homework1.c: undefined reference to `__bad_udelay'
collect2: ld returned 1 exit status

What do I have to do to link in to get __bad_udelay? Do I have to create a make file to include the kernel or parts of the Linux kernel to do this? I currently do not have a make file and am unsure how it should look like.


Old 02-19-2006, 07:30 PM   #2
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,191
Blog Entries: 4

Rep: Reputation: 464Reputation: 464Reputation: 464Reputation: 464Reputation: 464
Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.


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
Undefined reference, why? george_mercury Programming 4 05-07-2009 01:15 AM
Undefined Reference ChemicalBurn Programming 2 02-14-2005 04:01 AM
Hacking Win32 exe files ? (removing INT15 timer CALLS) for wine compatability qwijibow Linux - Software 5 06-24-2004 12:57 PM
Undefined reference error using gcc with Redhat Linux 9.0 armesk Programming 2 08-28-2003 07:42 AM
using timer for repeated function calls poojamanu Programming 1 04-09-2003 09:17 PM

All times are GMT -5. The time now is 02:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration