caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] newbie - running graphics applications in WinNT
@ 2001-10-13 22:41 fred
  2001-10-17 19:12 ` Xavier Leroy
  0 siblings, 1 reply; 4+ messages in thread
From: fred @ 2001-10-13 22:41 UTC (permalink / raw)
  To: caml-list

I'm experimenting with the "native" version of OCaml 3.02 on WinNT 4
(SP6).  I'm looking for help understanding how to run graphic
applications.

I'm able to run trivial examples from the oc.tar.gz distribution in
http://caml.inria.fr/Examples, but I can't figure out how to run the
included "graphics programs" such as colwheel.ml outside of
OCamlwin.exe.

I tried building an 'ocamlgraph' per the note in oc/eng.html, but that
fails with many errors like this:

   camlprim0.obj : error LNK2001: unresolved external symbol _gr_clear_graph

Searching at http://pauillac.inria.fr/bin/wilma/caml-list I find the
suggestion to run this

	ocamlmktop -o ocamlgraph graphics.cma

That fails, reporting

	Error while linking e:/programs/ocaml/lib\graphics.cma(Graphics):
        The external function `gr_set_window_title' is not available

The "readme.win" file says that '"graph" works only under the toplevel
application'.  Does that mean I can't build an 'ocamlgraph' at all on
WinNT?  I really want to use ocaml to create some standalone graphical
applications that can run on Win32 machines; is that possible?

Or should I forget the "graphics library" and use Labltk instead, or
perhaps LablGL or LablGTK?

-- 
Fred Yankowski           fred@OntoSys.com      tel: +1.630.879.1312
Principal Consultant     www.OntoSys.com       fax: +1.630.879.1370
OntoSys, Inc             38W242 Deerpath Rd, Batavia, IL 60510, USA
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] newbie - running graphics applications in WinNT
  2001-10-13 22:41 [Caml-list] newbie - running graphics applications in WinNT fred
@ 2001-10-17 19:12 ` Xavier Leroy
  2001-10-18 11:53   ` Frank Atanassow
  0 siblings, 1 reply; 4+ messages in thread
From: Xavier Leroy @ 2001-10-17 19:12 UTC (permalink / raw)
  To: fred; +Cc: caml-list

> The "readme.win" file says that '"graph" works only under the toplevel
> application'.  Does that mean I can't build an 'ocamlgraph' at all on
> WinNT?

Yes.  Currently, the graphics library is not available from
stand-alone Win32 executables, only from the toplevel GUI.

> I really want to use ocaml to create some standalone graphical
> applications that can run on Win32 machines; is that possible?

Not yet, but it will be soon.  A proper standalone implementation of
the Graphics library is in progress (by Jacob Navia) and should be
available in the next OCaml release.

> Or should I forget the "graphics library" and use Labltk instead, or
> perhaps LablGL or LablGTK?

That's another option.

- Xavier Leroy
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] newbie - running graphics applications in WinNT
  2001-10-17 19:12 ` Xavier Leroy
@ 2001-10-18 11:53   ` Frank Atanassow
  2001-10-18 13:14     ` Pierre Weis
  0 siblings, 1 reply; 4+ messages in thread
From: Frank Atanassow @ 2001-10-18 11:53 UTC (permalink / raw)
  To: Xavier Leroy; +Cc: fred, caml-list

Xavier Leroy wrote (on 17-10-01 21:12 +0200):
> > The "readme.win" file says that '"graph" works only under the toplevel
> > application'.  Does that mean I can't build an 'ocamlgraph' at all on
> > WinNT?
> 
> Yes.  Currently, the graphics library is not available from
> stand-alone Win32 executables, only from the toplevel GUI.
> 
> > I really want to use ocaml to create some standalone graphical
> > applications that can run on Win32 machines; is that possible?
> 
> Not yet, but it will be soon.  A proper standalone implementation of
> the Graphics library is in progress (by Jacob Navia) and should be
> available in the next OCaml release.

I recently built Ocaml 3.03 ALPHA under the latest Cygwin on Win2k, including
XFree86. The graphics library compiles without any problem, but if you
try to use it it, it will fail with an exception because graphics.ml does not
recognize Cygwin as a Unix-type system. This is easily fixed by patching
a definition in graphics.ml to read:

  let (open_graph, close_graph) =
    match Sys.os_type with
    | "Unix" | "Cywgin" -> (unix_open_graph, unix_close_graph)
    | ...

After that, I was able to create and use a graphics toplevel, and also to make
standalone (both bytecode and native) applications without any problems. Of
course, the graphics window shows up in the X server's window.

-- 
Frank Atanassow, Information & Computing Sciences, Utrecht University
Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
Tel +31 (030) 253-3261 Fax +31 (030) 251-379
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] newbie - running graphics applications in WinNT
  2001-10-18 11:53   ` Frank Atanassow
@ 2001-10-18 13:14     ` Pierre Weis
  0 siblings, 0 replies; 4+ messages in thread
From: Pierre Weis @ 2001-10-18 13:14 UTC (permalink / raw)
  To: Frank Atanassow; +Cc: xavier.leroy, fred, caml-list

> I recently built Ocaml 3.03 ALPHA under the latest Cygwin on Win2k, including
> XFree86. The graphics library compiles without any problem, but if you
> try to use it it, it will fail with an exception because graphics.ml does not
> recognize Cygwin as a Unix-type system. This is easily fixed by patching
> a definition in graphics.ml to read:
[...]
> Frank Atanassow, Information & Computing Sciences, Utrecht University
> Padualaan 14, PO Box 80.089, 3508 TB Utrecht, Netherlands
> Tel +31 (030) 253-3261 Fax +31 (030) 251-379

Thank you for the suggestion: I incorporated it in the working
sources of the library.

Best regards,

Pierre Weis

INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/


-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-10-18 13:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-13 22:41 [Caml-list] newbie - running graphics applications in WinNT fred
2001-10-17 19:12 ` Xavier Leroy
2001-10-18 11:53   ` Frank Atanassow
2001-10-18 13:14     ` Pierre Weis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).