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
Re: [Caml-list] Unix module troubles & Time functions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-07-19 (10:05)
From: Julien Michel <julien.michel@e...>
Subject: Re: [Caml-list] Unix module troubles & Time functions
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
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
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
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

Do I have to keep the wole content of the original timer.c file, and only
include my_gettimeofday function?


This message was sent using IMP, the Internet Messaging Program.