chardware-interfacegentooparallel-port

"#include <asm/io.h>" causes "error: asm/io.h: No such file or directory"


I am using gentoo and trying to compile a program to control the bits on the parallel port. It has this line near the top of it:

#include <asm/io.h>

And when I try to use gcc on it, it produces this output:

port.c:4:20: error: asm/io.h: No such file or directory

"locate asm/io.h" yeilds (among other things):

/usr/src/linux-2.6.32-gentoo/arch/x86/include/asm/io.h

So I have the header file, but it's not finding it? Why is this not working?


Solution

  • I am not sure if you are the author of the program or you're just trying to compile a program you got from someone, but looks like #include <asm/io.h> should be replaced with #include <sys/io.h>. See the results of this google search for more information.