I am trying to get a Hello, world! CGI script working using ocamlnet. On my system (Ubuntu AMD64 Jaunty), I installed the libocamlnet-ocaml,

Message 2 of 9
, Jul 17, 2009

0 Attachment

I am trying to get a "Hello, world!" CGI script working using ocamlnet. On
my system (Ubuntu AMD64 Jaunty), I installed the libocamlnet-ocaml,
libocamlnet-ocaml-bin, and libocamlnet-ocaml-dev packages. However, when I
try to '#load "ocamlnet.cma"', it bombs out saying it cannot find the file
ocamlnet.cma.

What can/should I be doing to load Ocamlnet2 as installed as a package?

... I think you ll also need to tell it where to find the ocamlnet.cma file, something like: #directory +ocamlnet The + sign tells it to look relative to the

Message 3 of 9
, Jul 17, 2009

0 Attachment

On Fri, Jul 17, 2009 at 02:41:45PM -0500, Jonathan Hayward wrote:

> I am trying to get a "Hello, world!" CGI script working using ocamlnet. On
> my system (Ubuntu AMD64 Jaunty), I installed the libocamlnet-ocaml,
> libocamlnet-ocaml-bin, and libocamlnet-ocaml-dev packages. However, when I
> try to '#load "ocamlnet.cma"', it bombs out saying it cannot find the file
> ocamlnet.cma.
>
> What can/should I be doing to load Ocamlnet2 as installed as a package?

I think you'll also need to tell it where to find the ocamlnet.cma
file, something like:

#directory "+ocamlnet"

The + sign tells it to look relative to the OCaml library directory
('ocamlc -where' will tell you that).

Rich.

--
Richard Jones
Red Hat

Jonathan Hayward

Thank you for the replies. Both when I changed to #require netcgi2 ;; and added #directory +ocamlnet ;; before, I am getting a crash: I/O error: Is a

Message 4 of 9
, Jul 20, 2009

0 Attachment

Thank you for the replies. Both when I changed to #require "netcgi2";; and
added #directory "+ocamlnet";; before, I am getting a crash:

I/O error: Is a directory

The error appears to be the same if I comment out the #directory line.