Version française
Home     About     Download     Resources     Contact us    
Browse thread
problem with ocamlmktop -output-obj
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: problem with ocamlmktop -output-obj
> I have encountered a problem while trying to build a toplevel
> (ocamlmktop) linked with
> - external C code and
> - ML code compiled as a C object (-output-obj and implicitely -custom).
> I have no problem when I build an ordinary batch (non-toplevel) program.
> Is this a limitation of the system or I am doing it wrong ?

Toplevels need access to their own symbol table, and they look inside
their executable file to find it.  The symbol table information is not
available if -output-obj is selected.

A regular bytecode executable file is composed of several sections:
code, data, symbols, and debug info.  Currently, only the first two
are available when a C object is generated instead of a regular
executable file.

For the same reasons, you can't debug a Caml program built with
-output-obj.

Hope this helps,

- Xavier Leroy