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

Re: ocamlgraph / ocamlfind / ocamlbuild



Is ocamlgraph showing up in your 'ocamlfind -list' ?

if so, you need to add a line to your _tags file

true: package(ocamlgraph)

Then,

$ ocamlbuild -use-ocamlfind main.native

should pick up the package dependency and include the appropriate hint to the build.  Let me know how that goes.

-anil

On 3 Apr 2012, at 12:54, Farhan Mannan wrote:

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®.