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
Two questions on OCamlDoc
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-09-15 (13:11)
From: Jan Kybic <kybic@f...>
Subject: Re: [Caml-list] Another question on OcamlDoc
>> Let me add another couple of questions about OcamlDoc. I am sorry if
>> this is a common knowledge.
>>    - how can I tell OcamlDoc to only process some files?
>>      Actually, the question is rather how to make OcamlDoc ignore the
>>      unresolved dependencies and "Unbound type constructor" errors.
> Does it stop ocamldoc or does is end in elements not linked in the final
> doc ?
> If it stops ocamldoc, then this is a compilation problem. Make sure you
> give the same options (-I, -rectypes, ...) to ocamldoc than to ocamlc.
> In th second case, you can use the -hide-warnings option.

I think I know what the problem was. I was compiling a program with
some of the source files in subdirectories, like

  ocalmfind ocamlc <some options> bootstrap/parallel.mli

Now when running ocamldoc like

  ocamlfind ocamldoc <some options> bootstrap/parallel.mli

it was capable of reading the source *.mli file but apparently it
also needs the *.cmi (or *.cmx ?) files which it could not find. So
the solution was to add the "include" option:

  ocamlfind ocamldoc <some options> -I bootstrap bootstrap/parallel.mli

So now everything is working well. Thank you for your help.


P.S. I am using the source files from subdirectories as a means of
sharing a source code between projects. It works but it is kind of
fragile. Does anyone have a better method?

Jan Kybic <>                       tel. +420 2 2435 5721                      ICQ 200569450