Hello,
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.

Sincerely,

Rabih Chaar


Vincent Gripon <vincent.gripon@telecom-bretagne.eu>
Sent by: caml-list-bounces@yquem.inria.fr

14/09/10 02:09 PM

To
caml-list@yquem.inria.fr
cc
Subject
[Caml-list] Compiling Ocaml sources to c sources





Hello,

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)?

Best,

Vincent
[attachment "vincent_gripon.vcf" deleted by Rabih CHAAR/fr/socgen] _______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

*************************************************************************
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
falsified.
                              ************
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.
*************************************************************************