List Info

Thread: "ocaml_beginners"::[] module usage




"ocaml_beginners"::[] module usage
user name
2006-11-18 14:20:19

Hello,

suppose I have a module "My_tools" stored in the "my_tools.cmo"
put in the directory
/home/user/caml/tools

How can I use this module in the file "my_code.ml"; which is in the
directory
/home/user/caml/program

Thanks
François Colonna

__._,_.___
.

__,_._,___
"ocaml_beginners"::[] module usage
user name
2006-11-18 16:08:32

2006/11/18, Francois Colonna < colonna%40ccr.jussieu.fr">colonnaccr.jussieu.fr>:
> Hello,
&gt;
>
&gt; suppose I have a module "My_tools" stored in the "my_tools.cmo&quot;
> put in the directory /home/user/caml/tools

you also need the my_tools.cmi

> How can I use this module in the file "my_code.ml"; which is in the
> directory /home/user/caml/program

when compiling :
ocamlc -c -I /home/user/caml/tools my_code.ml
when linking:
ocamlc -I /home/user/caml/tools my_tools.cmo my_code.cmo -o myprog

__._,_.___
.

__,_._,___
"ocaml_beginners"::[] module usage
user name
2006-11-18 19:16:13

Remi Vanicat wrote:
&gt; 2006/11/18, Francois Colonna < colonna%40ccr.jussieu.fr">colonnaccr.jussieu.fr>:
>
>> Hello,
&gt;>
>;>
>> suppose I have a module "My_tools" stored in the "my_tools.cmo&quot;
>&gt; put in the directory /home/user/caml/tools
>>
>
&gt; you also need the my_tools.cmi
>
&gt;
>> How can I use this module in the file "my_code.ml"; which is in the
>&gt; directory /home/user/caml/program
>&gt;
>
&gt; when compiling :
> ocamlc -c -I /home/user/caml/tools my_code.ml
> when linking:
> ocamlc -I /home/user/caml/tools my_tools.cmo my_code.cmo -o myprog
&gt;
>

Thanks
François Colonna

__._,_.___
.

__,_._,___
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )