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
Compiling Ocaml sources to c sources
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Rabih CHAAR <rabih.chaar@l...>
Subject: Re: [Caml-list] Compiling Ocaml sources to c sources [NC]
when compiling ocaml to bytecode with the -output-obj flag, a c file is 
created containing essentially the produced bytecode in a c array, which 
will be fed to caml via caml-startup functions.

This doesn't relate to generating C source with a translation for your 
functional code in Ocaml.

I don't have any knowledge of a tool that covers your need, but i am not 
an expert on these issues.


Rabih Chaar

Vincent Gripon <> 
Sent by:
14/09/10 02:09 PM


[Caml-list] Compiling Ocaml sources to c sources


We are currently planing to participate to a programming contest. This 
contest allows the use of four languages (C/C#/C++/java) but not OCaml. 

We would like to use Ocaml as it is to us the language that fits the most 
the kind of exercises proposed. The organizers don't mind if we use OCaml 
as long as we provide an easily compilable C source to them, even if it is 
not readable.

Is there any platform independent way to compile OCaml sources to C 
sources?  And if not, do you have any pointer (we gave a try at compiling 
OCaml sources to C object files using the -output-obj option but couldn't 
compile then the resulting file with our C compiler)?


Vincent[attachment "vincent_gripon.vcf" deleted by Rabih CHAAR/fr/socgen] 
Caml-list mailing list. Subscription management:
Beginner's list:
Bug reports:

This message and any attachments (the "message") are confidential, intended solely for the addressee(s), and may contain legally privileged information.
Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration.   
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or
Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et susceptibles de contenir des informations couvertes 
par le secret professionnel. 
Ce message est etabli a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite.
Tout message electronique est susceptible d'alteration. 
La SOCIETE GENERALE et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, deforme ou falsifie.