Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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 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.