From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 585D3BB83 for ; Wed, 19 Jul 2006 12:05:30 +0200 (CEST) Received: from min.univ-orleans.fr (min.univ-orleans.fr [193.49.83.6]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k6JA5Tbg014070 for ; Wed, 19 Jul 2006 12:05:30 +0200 Received: from mailetu.univ-orleans.fr (localhost [127.0.0.1]) by min.univ-orleans.fr (Postfix) with ESMTP id 57BA012B106 for ; Wed, 19 Jul 2006 12:05:19 +0200 (CEST) Received: from localhost (etu [127.0.0.1]) by mailetu.univ-orleans.fr (Postfix) with ESMTP id 46A028014 for ; Wed, 19 Jul 2006 12:03:11 +0200 (CEST) Received: from 81.80.205.253 ([81.80.205.253]) by webmailetu.univ-orleans.fr (Horde MIME library) with HTTP; Wed, 19 Jul 2006 12:03:11 +0200 Message-ID: <20060719120311.15vapx7fzu4owkgw@webmailetu.univ-orleans.fr> Date: Wed, 19 Jul 2006 12:03:11 +0200 From: Julien Michel To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Unix module troubles & Time functions MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.0.3) X-Miltered: at nez-perce with ID 44BE03E9.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; univ-orleans:01 unix:01 unix:01 gettimeofday:01 ocamlc:01 ocamlc:01 cmo:01 -custom:01 compilation:01 bytecode:01 plateform:01 ocaml:01 runtime:01 ocamlrun:01 gettimeofday:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Thanks a lot William, I am sure it will the best way for having acces to the Unix Gettimeofday function. Nevertheless, I used exactly the same code as you gave me below. While compiling: ocamlc -c timer.c no error ! then compiling: ocamlc -o timer timer.o timer.ml I get this error: "Error while linking timer.cmo: The external function `my_gettimeofday' is not available" so I tried: ocamlc -custom -o timer timer.o timer.ml no error during compilation but while executing the generated bytecode, wether it is on the development plateform, or on the embedded target, I get this error: Fatal error: unknown C primitive `my_gettimeofday' I am afraid to have came back to the beggining of my problem, with unixdup... I do not understand what is going on. Everthing seems to be ok from the Ocaml side, but there is something wrong from Unix/system side. Is there a way so that the runtime system "ocamlrun" can recognize "my_gettimeofday"? Do I have to keep the wole content of the original timer.c file, and only include my_gettimeofday function? Cheers ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.