Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Is Caml a fraud ( especially on Windows )?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dmitry Bely <dbely@m...>
Subject: Re: [Caml-list] ocamlopt / ocaml -custom and C compiler
Xavier Leroy <> writes:

>> BTW, why Ocaml developers decided that ocamlopt should generate
>> camlprim?.c in C, but not directly in Assembler?
> Unless I'm mistaken, ocamlopt doesn't generate a camlprim.c file;
> ocamlc -custom does.  The reason for going through C in this case is
> that ocamlc has no knowledge of the assembly language for the
> processor: ocamlc is designed to work for any system that provides an
> ANSI C compiler.

Sorry, my mistake. But ocamlopt uses C compiler for linking. Why not to use
the link utility itself (say, link.exe for MSVC build)?

>> This is especially inconvenient for
>> Windows users where C compiler is not the part of OS distribution and
>> should be bought separately...
> We have addressed this issue in at least two different ways.  One is
> the dynamic loading of C/Caml stub code, as implemented since release
> 3.04.  Now is the time for external C libraries to use this mechanism,
> especially if they are to run under Windows.  The second answer to
> this problem is the Mingw port.  Don't complain about lack of options :-)

I am aware of MinGW port :-), but thank you for the detailed explanation.

- Dmitry Bely

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: