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

Notices


Reply
  Search this Thread
Old 01-19-2004, 10:10 AM   #1
CyberEE
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);
iopl(3);

while (1)
{


printf("enter port: ");
scanf("%4X",&y);
x = readl(baseptr+y);
printf("0X%8.8X\n",x);
}
return 0;
}


System info
mandrake 9.2
p3 700
256 mb ram
 
  


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
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


All times are GMT -5. The time now is 06:11 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration