Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <000701bf6424$f277c900$3050fbc1@bn> From: "bruno" To: Subject: asm/io.h where can I find this ?? Date: Fri, 21 Jan 2000 16:33:56 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Hello and Thanks you for openning this message. I'm working on a chip-card reader running on parrallel port this program works under linux red hat, using the command line : -> gcc myprog.c -omyprog -O2 and ->/myrep/myprog but when I try to compile it under cygwin )))-: it doesn't works BASH.EXE-2.02$ pwd /cygnus/cygwin-b20/bruno ---#include -------------------------------------------- using ORIGINAL LINE : #include BASH.EXE-2.02$ gcc carte.c -ocarte.exe -O2 carte.c:3: asm/io.h: No such file or directory ---#include ------------------------------------------------ using : #include BASH.EXE-2.02$ gcc carte.c -ocarte.exe -O2 C:\WINDOWS\TEMP\cch8fVba.o(.text+0x2a):carte.c: undefined reference to `ioperm' C:\WINDOWS\TEMP\cch8fVba.o(.text+0x4e):carte.c: undefined reference to `outb' C:\WINDOWS\TEMP\cch8fVba.o(.text+0x64):carte.c: undefined reference to `outb' C:\WINDOWS\TEMP\cch8fVba.o(.text+0x76):carte.c: undefined reference to `inb' C:\WINDOWS\TEMP\cch8fVba.o(.text+0xb8):carte.c: undefined reference to `outb' C:\WINDOWS\TEMP\cch8fVba.o(.text+0xd0):carte.c: undefined reference to `outb' C:\WINDOWS\TEMP\cch8fVba.o(.text+0xe7):carte.c: undefined reference to `outb' collect2: ld returned 1 exit status ---include ------------------------------------------------ using : #include BASH.EXE-2.02$ gcc carte.c -ocarte.exe -O2 In file included from carte.c:5: C:\CYGNUS\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\.. \..\ ..\..\i586-cygwin32\include\mingw32/io.h:38: dir.h: No such file or directory C:\CYGNUS\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\.. \..\ ..\..\i586-cygwin32\include\mingw32/io.h:51: warning: `X_OK' redefined C:\CYGNUS\CYGWIN~1\H-I586~1\BIN\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\.. \..\ ..\..\i586-cygwin32\include\sys/unistd.h:95: warning: this is the location of th e previous definition ------------------------------------------------------------------------- this is the lib I need ORIGINAL LINE : #include have tried to use : #include or : #include where can I find the the equivalent of red hat "asm/io.h" and where sould I copy it under cygwin ? The following is myprog.c (fastly commented) source it will be usefull to understand what I say. Tank you Regards Bruno +-------------+-----------------------------------------------------+ |...B-N...... | reply to Bruno-71 AT ifrance DOT com will be apprecaited | |..(\"/)...<- | Vlad my hamster, eating something while I try to | |.( :O: ).... | write english and learn something | |..o---o..... | Only in french http://perso.wanadoo.fr/bruno-n3 | +-------------+-----------------------------------------------------+ /*----Start of myprog source -------*/ #include #include #include /* adresse du base port parallele */ #define BASEPORT 0x378 // base adress port printer port int main() { unsigned int lu; // variable lu sur 0x379 read on int i=1; int j=1; /* demande d'autorisation d'utiliser le port ou arret avec erreur */ /* ask for auhorisation to use the port or stop *: if (ioperm(BASEPORT,3,1)) {perror("ioperm"); exit(1);} outb(11,BASEPORT); /* init de la puce-chip */ usleep(10000); outb(9,BASEPORT); /* keep "on" chip */ while(i<=256) { lu=inb(BASEPORT+1); lu=lu & 128; /* read pin 11 (connected to the chip data out) on port */ if (lu==128) lu=1; printf("%d", lu); if (j==65) {j=0; printf("\n");} i++; j++; outb(13,BASEPORT); /* go to next bit on chip */ usleep(10000); outb(9,BASEPORT); /* keep "on" chip */ } outb(0,BASEPORT); /* trun "off" chip */ printf("\n"); exit(0); } /*----End of myprog source -------*/ ______________________________________________________________________________ Si votre email etait sur iFrance vous pourriez ecouter ce message au tel ! http://www.ifrance.com : ne laissez plus vos emails loins de vous ... gratuit sur iFrance : emails (20 MO, POP, FAX), Agenda, Site perso -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com