i'm trying to write an extremely simple program that writes to the parallel port:
The problem is when i compile it it tells me i have a undefined reference to the outb function. The man pages tell me that i need to include option -O# to compile my program. I use:
int main(int argc, char *argv)
int addr = 0x378;
int result = ioperm(addr,5,1);
which spits out:
gcc -O2 ./main.c -o main.o -lm
what am i doing wrong, am i missing an include file or something?
/tmp/ccW9TX56.o: In function `main':
main.c:(.text+0x31): undefined reference to `outb'
collect2: ld returned 1 exit status