|
List Info
Thread: "ocaml_beginners"::[] no implementations provided
|
|
| "ocaml_beginners"::[] no
implementations provided |
  Germany |
2007-02-26 20:56:29 |
|
Hi all,
I compile my program with under windows:
ocamlc prg1.ml str.cma -o prg1.exe
This works fine and I can execute the bytecode compiled program. However
if I do:
ocamlopt prg1.ml str.cmxa -o fussball.exe
I get:
No implementations provided for the following modules:
Str referenced by prg1.cmx
How come that there is no implementation provided? In the CAMLLIB
directory are the:
- str.cmx
- str.cmxa
files. What can I do to make it run?
Thank you, cheers, chris
__._,_.___
.
__,_._,___
|
| Re: "ocaml_beginners"::[] no
implementations provided |
  United States |
2007-02-26 21:07:09 |
|
On Mon, 26 Feb 2007, christian konrad wrote:
> Hi all,
>
> I compile my program with under windows:
>
> ocamlc prg1.ml str.cma -o prg1.exe
I don't know why this works. I think it should fail. See below.
> This works fine and I can execute the bytecode compiled program. However
> if I do:
>
> ocamlopt prg1.ml str.cmxa -o fussball.exe
>
> I get:
>
> No implementations provided for the following modules:
> Str referenced by prg1.cmx
You need to place the compilation units in order: prg1 uses str, so it
must come after str on the command line.
Martin
--
Martin Jambon
http://martin.jambon.free.fr
__._,_.___
.
__,_._,___
|
| Re: "ocaml_beginners"::[] no
implementations provided |
  Germany |
2007-02-26 21:11:42 |
|
Hi Martin,
thanks, it works and makes at least sense. But why do the ocaml guys
decide to do it that way? Wouldn't it be better not to have to care
about the order?
chris
Martin Jambon wrote:
> On Mon, 26 Feb 2007, christian konrad wrote:
>
> > Hi all,
> >
> > I compile my program with under windows:
> >
> > ocamlc prg1.ml str.cma -o prg1.exe
>
> I don't know why this works. I think it should fail. See below.
>
> > This works fine and I can execute the bytecode compiled program. However
> > if I do:
> >
> > ocamlopt prg1.ml str.cmxa -o fussball.exe
> >
> > I get:
> >
> > No implementations provided for the following modules:
> > Str referenced by prg1.cmx
>
> You need to place the compilation units in order: prg1 uses str, so it
> must come after str on the command line.
>
> Martin
>
> --
> Martin Jambon
> http://martin.jambon.free.fr <http://martin.jambon.free.fr>
>
>
__._,_.___
.
__,_._,___
|
| Re: "ocaml_beginners"::[] no
implementations provided |
  United Kingdom |
2007-02-26 21:12:22 |
|
On Tuesday 27 February 2007 03:11, christian konrad wrote:
> Martin Jambon wrote:
> > On Mon, 26 Feb 2007, christian konrad wrote:
> > > Hi all,
> > >
> > > I compile my program with under windows:
> > >
> > > ocamlc prg1.ml str.cma -o prg1.exe
> >
> > I don't know why this works. I think it should fail. See below.
IIRC, ocaml bytecode can afford to be more intelligent about module loading. I
forget why...
--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
OCaml for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists
__._,_.___
.
__,_._,___
|
| Re: "ocaml_beginners"::[] no
implementations provided |
  United States |
2007-02-26 22:23:03 |
|
On Mon, 26 Feb 2007, christian konrad wrote:
> Hi Martin,
>
> thanks, it works and makes at least sense. But why do the ocaml guys
> decide to do it that way? Wouldn't it be better not to have to care
> about the order?
Since there is no "main" function, every module may possibly compute
things, and you want to be able to control in which order this
happens.
Mutually recursive submodules are currently an experimental extension of
OCaml (see the dedicated section in the manual), and they have some
restrictions due to the reason stated above, including runtime errors.
Martin
--
Martin Jambon
http://martin.jambon.free.fr
__._,_.___
.
__,_._,___
|
[1-5]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|