Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] building OCaml under MinGW
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques Garrigue <garrigue@k...>
Subject: Re: [Caml-list] building OCaml under MinGW
From: Xavier Leroy <xavier.leroy@inria.fr>
> > Interesting. I uninstalled my mingw installation and installed
> > cygwin (containing mingw) instead.  This time, my installation went
> > much further before messing up. But in the end, I still got errors,
> > and the installation failed. Here's where it fails:
> > cltkImg.c: In function `camltk_setimgdata_native':
> > cltkImg.c:102: too few arguments to function `Tk_PhotoPutBlock'
> 
> Are you sure you have the recommended version of Tcl/TK?  (8.3)

Indeed, this error is caused by Tcl/Tk 8.4.

Here is an easy patch (useful also for users of recent Linux
distributions)

Jacques Garrigue

Index: otherlibs/labltk/support/cltkImg.c
===================================================================
RCS file: /net/pauillac/caml/repository/csl/otherlibs/labltk/support/cltkImg.c,v
retrieving revision 1.3
diff -c -r1.3 cltkImg.c
*** cltkImg.c	2002/07/23 14:11:59	1.3
--- cltkImg.c	2002/10/24 03:19:38
***************
*** 99,105 ****
    pib.offset[0] = 0;
    pib.offset[1] = 1;
    pib.offset[2] = 2;
!   Tk_PhotoPutBlock(ph,&pib,Int_val(x),Int_val(y),Int_val(w),Int_val(h)); 
  }
  
  CAMLprim void camltk_setimgdata_bytecode(argv,argn)
--- 99,109 ----
    pib.offset[0] = 0;
    pib.offset[1] = 1;
    pib.offset[2] = 2;
!   Tk_PhotoPutBlock(ph,&pib,Int_val(x),Int_val(y),Int_val(w),Int_val(h)
! #if (TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION >= 4 || TK_MAJOR_VERSION > 8)
!                    , TK_PHOTO_COMPOSITE_SET
! #endif
!     ); 
  }
  
  CAMLprim void camltk_setimgdata_bytecode(argv,argn)
Index: otherlibs/labltk/tkanim/tkAnimGIF.c
===================================================================
RCS file: /net/pauillac/caml/repository/csl/otherlibs/labltk/tkanim/tkAnimGIF.c,v
retrieving revision 1.4
diff -c -r1.4 tkAnimGIF.c
*** tkAnimGIF.c	2002/07/23 14:12:00	1.4
--- tkAnimGIF.c	2002/10/24 03:19:38
***************
*** 335,342 ****
                  goto error;
              }
          }
!         Tk_PhotoPutBlock(photoHandle, &block, 0, 0, 
!                          imageWidth, imageHeight);
  #ifdef TKANIM_DEBUG
      fprintf(stderr, " Retrieving result\n");
  #endif
--- 335,345 ----
                  goto error;
              }
          }
!         Tk_PhotoPutBlock(photoHandle, &block, 0, 0, imageWidth, imageHeight
! #if (TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION >= 4 || TK_MAJOR_VERSION > 8)
!                    , TK_PHOTO_COMPOSITE_SET
! #endif
!           );
  #ifdef TKANIM_DEBUG
      fprintf(stderr, " Retrieving result\n");
  #endif
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners