From: "Mauricio Fernández" Date: 2004-02-04T07:11:12+09:00 Subject: Re: ruby-serialport on Win32 On Wed, Feb 04, 2004 at 02:15:04AM +0900, Stephan K�mper wrote: > Hi group, > > has anybody used the serial port library on a Win32 system? > > I would like to, but don't have a compiler installed on the system where > I'd like to use (and the other system I use isn't Win32). > > And if you did: What compiler did you use? How did you make it. (Please > note the pun ;) I compiled it with both cygwin and mingw. The .so made with the latter could be used with the PragProg's single-click installer (the former was to be used with cygwin's ruby only). What I did was installing mingw, building Ruby with it (just to get a valid rbconfig.rb), and then *using the new ruby binary* run ruby extconf.rb make at this point you cannot 'make install' cause that would put the .so in the wrong sitelibdir, so I just copied it by hand to the appropriate place in c:\Ruby (where I had installed the one-click distro). Of course you can always just modify $:. One thing that confused me a bit is that in mingw's version #read (for the serial port object) was blocking whereas in cygwin it wasn't. But I should have used #sysread anyway. -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com We are Pentium of Borg. Division is futile. You will be approximated. -- seen in someone's .signature