pppd
2005-08-25 20:15:15 UTC
Hello guys,
I'd like to use ioperm functions under Cygwin 1.5.18 ( 0.132/4/2 ).
First I have tried to compile my C code ( below ) on Cygwin.
P.S: It works on Linux.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/io.h>
int main( void ) {
unsigned char Value;
ioperm(0x378, 3, 1);
Value = inb(0x378+1);
ioperm(0x378, 3, 0);
printf("Status Parallel Port -> 0x%x\n", Value );
return 0;
}
Trying compile...
$ gcc -o io io.c -Wall
/cygdrive/c/DOCUME~1/t00707/CONFIG~1/Temp/ccKOfTff.o:io.c:(.text+0x42): undefined reference to `_ioperm'
/cygdrive/c/DOCUME~1/t00707/CONFIG~1/Temp/ccKOfTff.o:io.c:(.text+0x6d): undefined reference to `_ioperm'
collect2: ld returned 1 exit status
Maybe I need install ioperm package? I have tried it too.
$ ioperm -i
OpenSCManager function call failed.
Error: ioperm.sys installation failed.
and then..
$ ioperm.sys
bash: /usr/bin/ioperm.sys: Permission denied
Does anybody can help me ?
Best Regards,
Douglas Schilling Landgraf
I'd like to use ioperm functions under Cygwin 1.5.18 ( 0.132/4/2 ).
First I have tried to compile my C code ( below ) on Cygwin.
P.S: It works on Linux.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/io.h>
int main( void ) {
unsigned char Value;
ioperm(0x378, 3, 1);
Value = inb(0x378+1);
ioperm(0x378, 3, 0);
printf("Status Parallel Port -> 0x%x\n", Value );
return 0;
}
Trying compile...
$ gcc -o io io.c -Wall
/cygdrive/c/DOCUME~1/t00707/CONFIG~1/Temp/ccKOfTff.o:io.c:(.text+0x42): undefined reference to `_ioperm'
/cygdrive/c/DOCUME~1/t00707/CONFIG~1/Temp/ccKOfTff.o:io.c:(.text+0x6d): undefined reference to `_ioperm'
collect2: ld returned 1 exit status
Maybe I need install ioperm package? I have tried it too.
$ ioperm -i
OpenSCManager function call failed.
Error: ioperm.sys installation failed.
and then..
$ ioperm.sys
bash: /usr/bin/ioperm.sys: Permission denied
Does anybody can help me ?
Best Regards,
Douglas Schilling Landgraf