Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 01-19-2004, 10:10 AM   #1
LQ Newbie
Registered: May 2001
Posts: 17

Rep: Reputation: 0
ioremap() and readl() not compiling

I am trying to write some code to read from a network controller,

when i compile the code I get:

in.c: In function `main':
in.c:14: warning: initialization makes pointer from integer without a cast
/home/tpriest/tmp/ccgYSZJ9.o(.text+0x1b): In function `main':
: undefined reference to `ioremap'
/home/tpriest/tmp/ccgYSZJ9.o(.text+0x58): In function `main':
: undefined reference to `readl'
collect2: ld returned 1 exit status

sorce code:

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <asm/io.h>

int main (void)
int x;
unsigned int y;
char *baseptr = ioremap(0Xdb000000, 1024*1024);

while (1)

printf("enter port: ");
x = readl(baseptr+y);
return 0;

System info
mandrake 9.2
p3 700
256 mb ram


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
ioremap and remap_page_range mspies Linux - Software 1 08-20-2005 10:41 PM
Various Compiling Errors (GCC compiling Openal, GUIlib, xmms-wma) gregorya Linux - Software 2 08-27-2004 05:03 AM
Compiling in ACPI support on Compaq 2135CA (system crashes while compiling) Dag Linux - Laptop and Netbook 20 07-30-2004 07:56 PM
compiling using c++ red_deb Mandriva 1 03-15-2004 06:06 AM
Kernel compiling and module compiling tarballed Linux - General 1 12-22-2002 05:31 PM > Forums > Linux Forums > Linux - Software

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