caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Julien Michel <julien.michel@etu.univ-orleans.fr>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Unix module troubles & Time functions
Date: Wed, 19 Jul 2006 12:03:11 +0200	[thread overview]
Message-ID: <20060719120311.15vapx7fzu4owkgw@webmailetu.univ-orleans.fr> (raw)

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.


             reply	other threads:[~2006-07-19 10:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-19 10:03 Julien Michel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-07-18 10:10 Julien Michel
2006-07-18 11:59 ` [Caml-list] " Jean-Christophe Filliatre
2006-07-18 13:27   ` Julien Michel
2006-07-18 15:33 ` William D. Neumann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060719120311.15vapx7fzu4owkgw@webmailetu.univ-orleans.fr \
    --to=julien.michel@etu.univ-orleans.fr \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).