[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ocamlgraph / ocamlfind / ocamlbuild



Hey,

Until now I've been compiling with a script that looked like 
#!/bin/sh 
ocamlc -g -annot -I +ocamlgraph graph.cma extra.ml node.ml network.ml algorithm.ml topology.ml simulator.ml 
ocamlc -o simulator -I +ocamlgraph graph.cma extra.cmo node.cmo network.cmo algorithm.cmo topology.cmo simulator.cmo
 but since I'm now refactoring quite heavily - and changing the dependencies between the files a lot - I am trying to switch to ocamlbuild.

The name of the main executable changes from simulator to main below:

1. Ideally something like this would work:  "ocamlbuild -use-ocamlfind main.native"
where my _tags file has "ocamlbuild -use-ocamlfind main.native" at the end, but this doesn't at the moment as ocamlfind isn't picking up ocamlgraph (i.e. it doesn't show up when I do "ocamlfind list").

2. Alternatively I was trying to just replicate my original compiler commands with this:
ocamlbuild -cflags -I,+ocamlgraph -lflag graph.cma main.native 

but that doesn't make sense - it doesn't know what to do with graph.cma

So does anyone know how to
1. make findlib/ocamlfind recognise ocamlgraph? I installed ocamlgraph using apt
2. get ocamlbuild to use the graph.cma object file? if I run the command in 2. without graph.cma, it simply complains that Graph is unbound etc.

Thanks,
Farhan


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.