[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Tore Lund <tl001@o...> |
| Subject: | Re: [Caml-list] Porting to EPOC |
Xavier Leroy wrote:
>
> [ Cross-compiling OCaml bytecode for a runtime system containing
> platform-specific external functions. ]
>
> > I notice there is an undocumented compiler switch -use-prims <file>.
> > Maybe this would solve my problem if I knew the format of <file>?
>
> Yes, -use-prims is exactly what you need. The format is one C
> function name per line, in the exact order in which they appear in the
> table cprim[] in byterun/prims.c.
>
> Even easier: building the runtime system in byterun produces the file
> byterun/primitives, which happens to have exactly the right format. Whopee!
Sorry, doesn't work. I try to compile the following file:
let _ = c_test ();;
and all I get is this:
C:\Data\ocaml>ocamlc -use-prims prims ctest.ml
File "ctest.ml", line 1, characters 8-14:
Unbound value c_test
even though I have put c_test at the bottom of the list in prims.
Any ideas?
--
Tore
-------------------
To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr