Loading ...
Sorry, an error occurred while loading the content.

problem with LablTk

Expand Messages
  • Alain Coste
    Hello, I get an error when I try to use LablTk. My configuration: - Windows XP - OCaml 3.10, native port Visual C - TclTk 8.5.1.0 (same problem with 8.4
    Message 1 of 4 , Apr 1, 2008
    • 0 Attachment
      Hello,
      I get an error when I try to use LablTk.
      My configuration:
      - Windows XP
      - OCaml 3.10, native port Visual C
      - TclTk 8.5.1.0 (same problem with 8.4 version)

      Program ess.ml :
      open Tk
      let top = openTk ()
      let b = Button.create ~text: "Hello, LablTk!" top
      let _ = pack [coe b]
      let _ = Printexc.print mainLoop ()

      Compilation: ocamlc -g -w s -I +labltk labltk.cma ess.ml -o ess.exe
      --> OK
      Execution: ocamlrun ess.exe (or directly ess.exe)
      --> Fatal error: cannot load shared library dlllabltk
      Reason: %1 n'est pas une application Win32 valide.

      Same problem with the top-level:
      # #directory "+labltk";;
      # #load "labltk.cma";;
      Cannot load required shared library dlllabltk.
      Reason: D:\ObjectiveCaml\lib\stublibs\dlllabltk.dll: %1 n'est pas une
      application Win32 valide.

      I suspect a problem of shell parameter extension (because of the %1), but
      where ?

      Other (related?) problems:
      - impossible tu run ocamlbrowser :
      --> message"l'application n'a pas réussi à s'initialiser correctement
      (0xc000007b)
      - dll error when I try to use LablGtk
      --> message "libgtk-win32-2.0-0.dll not found"
      I checked the variable OCAMLIB and the file ld.conf, which are correct.

      Alain Coste
    • jshaw10
      Unless you compiled ocaml yourself, you need to use tcl/tk 8.4. What distribution of Tcl/tk are you using? I use the activetcl one and haven t had any
      Message 2 of 4 , Apr 11, 2008
      • 0 Attachment
        Unless you compiled ocaml yourself, you need to use tcl/tk 8.4. What
        distribution of Tcl/tk are you using? I use the activetcl one and
        haven't had any problems.
      • Adrien
        Btw, when I tried labltk with tcl/tk 8.5 it didn t work. Can anyone confirm labltk needs 8.4 ?
        Message 3 of 4 , Apr 12, 2008
        • 0 Attachment
          Btw, when I tried labltk with tcl/tk 8.5 it didn't work. Can anyone
          confirm labltk needs 8.4 ?

          2008/4/12, jshaw10 <jshaw10@...>:
          > Unless you compiled ocaml yourself, you need to use tcl/tk 8.4. What
          > distribution of Tcl/tk are you using? I use the activetcl one and
          > haven't had any problems.
          >
          >
          > ------------------------------------
          >
          > Archives up to December 31, 2007 are also downloadable at http://www.connettivo.net/cntprojects/ocaml_beginners/
          > The archives of the very official ocaml list (the seniors' one) can be found at http://caml.inria.fr
          > Attachments are banned and you're asked to be polite, avoid flames etc.Yahoo! Groups Links
          >
          >
          >
          >
        • alain_coste
          ... Hello, My problem is solved. I was launching ocaml as a subprocess of xemacs, and the default settings of xemacs is to allow only one subprocess to be
          Message 4 of 4 , Apr 12, 2008
          • 0 Attachment
            --- In ocaml_beginners@yahoogroups.com, "jshaw10" <jshaw10@...> wrote:
            >
            > Unless you compiled ocaml yourself, you need to use tcl/tk 8.4. What
            > distribution of Tcl/tk are you using? I use the activetcl one and
            > haven't had any problems.

            Hello,
            My problem is solved. I was launching ocaml as a subprocess of xemacs,
            and the default settings of xemacs is to allow only one subprocess to be
            launched; I have changed this and now labltk works fine.
            I confirm that version 8.5 of tcl/tk doesn't work, as the names of dlls
            (ending in 8.4) are coded in the binaries of labltk; same thing for
            ocaml browser, which needs 8.4 (as it uses labltk).
            Well, perhaps some day, if I feel brave, I will try to compile ocaml
            with 8.5...
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.