1518Re: "ocaml_beginners":: Multiple directories.
- Dec 1, 2003On Thu, 27 Nov 2003 11:16:24 +0000, Richard Jones <rich@...>
>It sounds like an ordinary Makefile can do what you want.Makefiles aren't the only problem.
One example ( that I remember was a problem in the past ).
If I build two different libraries, a.cma and b.cma in different
directories how can I load them into the top in a way that is
( BTW your Makefile does explicitly depend on where some
of the libs are installed. )
A bigger example that I am now encoutnering is this.
I wrap some OS calls in C functions and call the C functions
from OCaml. I build cma and I build a toplevel. The C code is
kept in an object file ( not a dll/so ), and linked in. The problem
is that I can only open the toplevel or do a #load "dir/xxx.cma";;
if my pwd is the dir of xxx.cma.
If I try to start the toplevel from some other directory, then I
cannot open the module xxx. It tells me that xxx is an unbound module.
( But starting in the directory it is OK. )
If I try to start the standard toplevel ( ocaml or ocaml.exe ), and do
#load "dir/xxx.cma";; I get an undefined symbol error. Of course it
loads OK if the pwd is the dir of xxx.cma.
Thaddeus L. Olczyk
Think twice, code once.
- << Previous post in topic Next post in topic >>