gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compiling gnokii under Win32/cygwin, HOWTO


From: Feico de Boer
Subject: Re: compiling gnokii under Win32/cygwin, HOWTO
Date: Wed, 18 Sep 2002 13:19:29 +0200
User-agent: KMail/1.4.1

On Wednesday 18 September 2002 10:17, Mark Lakata wrote:

> I just downloaded the .4.3 distribution and had to do a little hacking to
> get it to work under Windows.

> 2. copy the serial_nreceived() and serial_flush() subroutines from
> unixserial.c into winserial.c, and remove everything but the last lines
> that return the no error flag. In other words, just put in dummies to get
> the program to properly link.  My guess that no one has tried compiling for
> windows for a while...

Well, you're right. The last time I compiled with Cygwin (or actually at all) 
was somewhere end of May. May 28th my daughter was born and I haven't had 
time since.

When I did a quick look at the source I found that these functions are called 
only in case of infrared communications. As far as I know infrared (ircomm 
nor irda) have never worked under Win32, not under Cygwin and not natively 
compiled with Microsoft Visual Studio 6. If infrared is still not supported 
the following patch should work as well.

Index: device.c
===================================================================
RCS file: /cvsroot/gnokii/gnokii/common/device.c,v
retrieving revision 1.19
diff -u -r1.19 device.c
--- device.c    13 Sep 2002 22:40:00 -0000      1.19
+++ device.c    18 Sep 2002 10:02:21 -0000
@@ -231,8 +231,10 @@
 
        switch (devicetype) {
        case GCT_Serial:
+#if !defined(WIN32)
        case GCT_Infrared:
                return serial_nreceived(device_portfd, n);
+#endif
        default:
                return GE_NOTSUPPORTED;
        }
@@ -242,8 +244,10 @@
 {
        switch (devicetype) {
        case GCT_Serial:
+#if !defined(WIN32)
        case GCT_Infrared:
                return serial_flush(device_portfd);
+#endif
        default:
                return GE_NOTSUPPORTED;
        }

> 3. configure using this:
>
>   ./configure --enable-win32 --disabled-shared

That is correct, for some reason the shared library thing does not work out of 
the box. Never had time to fix it.

> 4. edit the common/Makefile and gnokii/Makefile and fix the 'install:'
> targets. The $(DEST_DIR) appears to be poorly implemented; it causes an
> error with 'install'. just delete the sequence "$(DEST_DIR)/" in two places
> in each of these makefiles. you will see what happens if you don't...

> 5. finally
>   make install

Never used make install actually ...

> 7. edit the _gnokiirc file. change these two lines
>
>  port = COM1:
>  use_locking = no

The locking stuff must be new. Isn't this *nix specific?

Regards,
Feico





reply via email to

[Prev in Thread] Current Thread [Next in Thread]