From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=HTML_MESSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 879A4BC8A for ; Mon, 21 Aug 2006 14:13:38 +0200 (CEST) Received: from parmail01.sgcib.com (parmail01.sgcib.com [207.45.250.33]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k7LCDbB2021622 for ; Mon, 21 Aug 2006 14:13:37 +0200 X-IronPort-AV: i="4.08,151,1154901600"; d="scan'208,217"; a="126909844:sNHT57667104" Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C6C51B.3A95E85F" X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Subject: Presicions on executable generation from caml: does ocamlopt -outpput-obj generates a main function ? Date: Mon, 21 Aug 2006 14:13:36 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Presicions on executable generation from caml: does ocamlopt -outpput-obj generates a main function ? Thread-Index: AcbFGzrNPzaTIOgiS1mu2NUiBhJJ7w== From: "EL CHAAR Rabih SGAM/AI/SAM" To: "caml-list" X-OriginalArrivalTime: 21 Aug 2006 12:13:36.0639 (UTC) FILETIME=[3AB558F0:01C6C51B] X-NAI-Spam-Rules: 1 Rules triggered BAYES_01=-1.2 X-j-chkmail-Score: MSGID : 44E9A371.000 on concorde : j-chkmail score : XX : 5/20 0 X-Miltered: at concorde with ID 44E9A371.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocamlopt:01 ocamlc:01 cmo:01 cmo:01 byte:01 ocamlopt:01 -verbose:01 cmx:01 translated:01 libs:01 ocamlc:01 lib:01 pointers:01 byte:01 cmx:01 This is a multi-part message in MIME format. ------_=_NextPart_001_01C6C51B.3A95E85F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="us-ascii" Hello everyone, I want to have some precisions concerning executable generation from an ml file. I am a bit accustomed with the ocamlc code generation. =20 The ml is compiled into a .cmo. A C file is generated, embedding the cmo into a byte array which will be passed to the function caml_startup =20 The main() function just calls the caml_startup() (or caml_main()). =20 =20 My question is relevant to the ocamlopt generator. When doing a -verbose, we see that there is no C file generated. The .cmx is translated into assembly .asm, that in turn using ml.exe is converted it into a .obj. I don't know if in this case there is a main function which is defined (inside the resulting .obj). =20 I am trying to build an executable which links to a library needing f2c libs, libF77 and libI77. The first one needs to have a main function defined. =20 When compiling with ocamlc, everything works fine, but switching to ocamlopt yields the error message =20 libF77.lib(main.obj) : error LNK2019: unresolved external symbol _MAIN__ referenced in function _main =20 Thanks in advance for your help. Any pointers to ocamlopt executable generation are welcome. =20 Rabih Ce message et toutes les pieces jointes (ci-apres le "message") sont confid= entiels et etablis a l'intention exclusive de ses destinataires.=20 Toute utilisation ou diffusion non autorisee est interdite.=20 Tout message electronique est susceptible d'alteration.=20 Societe Generale Asset Management et ses filiales declinent toute responsab= ilite au titre de ce message s'il a ete altere, deforme ou falsifie.=20 =20 Decouvrez l'offre et les services de Societe Generale Asset Management sur = le site www.sgam.fr=20 =20 ********=20 =20 This message and any attachments (the "message") are confidential and inten= ded solely for the addressees.=20 Any unauthorised use or dissemination is prohibited.=20 E-mails are susceptible to alteration.=20 Neither Societe Generale Asset Management nor any of its subsidiaries or af= filiates shall be liable for the message if altered, changed or falsified.=20 =20 Find out more about Societe Generale Asset Management's proposal on www.sga= m=2Ecom ------_=_NextPart_001_01C6C51B.3A95E85F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="us-ascii"

Hello everyone,

I want to have some precisions concerning executa= ble generation from an ml file.

I am a bit accustomed with the ocamlc code generation.

 

The ml is compiled into a .cmo.=

A C file is generated, embedding the cmo into a b= yte array which will be passed to the function caml_startup

 

The main() function just calls the caml_startup()= (or caml_main()).

 

 

My question is relevant to the ocamlopt generator= .

When doing a –verbose, we see that there is= no C file generated. The .cmx is translated into assembly .asm, that in turn u= sing ml.exe is converted it into a .obj.

I don’t know if in this case there is a main function which is defined (inside the resulting .obj).

 

I am trying to build an executable which links to= a library needing f2c libs, libF77 and libI77. The first one needs to have a = main function defined.

 

When compiling with ocamlc, everything works fine, but switching to ocamlopt yields the error message=

 

libF77.lib(main.obj) : error LNK2019: unresolved external symbol _MAIN__ referenced in function _main

 

Thanks in advance for your help.

Any pointers to ocamlopt executable generation are welcome.

 

Rabih

Ce message et toutes les pieces jointes (ci-apres le "message") sont c=
onfidentiels et etablis a l'intention exclusive de ses destinataires.=20
Toute utilisation ou diffusion non autorisee est interdite.=20
Tout message electronique est susceptible d'alteration.=20
Societe Generale Asset Management et ses filiales declinent toute responsab=
ilite au titre de ce message s'il a ete altere, deforme ou falsifie.=20
 =20
Decouvrez l'offre et les services de Societe Generale Asset Management sur =
le site www.sgam.fr=20
 =20
                                ********=20
 =20
This message and any attachments (the "message") are confidential and inten=
ded solely for the addressees.=20
Any unauthorised use or dissemination is prohibited.=20
E-mails are susceptible to alteration.=20
Neither Societe Generale Asset Management nor any of its subsidiaries or af=
filiates shall be liable for the message if altered, changed or falsified.=20
=20
Find out more about Societe Generale Asset Management's proposal on www.sga=
m=2Ecom
------_=_NextPart_001_01C6C51B.3A95E85F--