cil-project / cil

C Intermediate Language
Other
348 stars 86 forks source link

Error linking while using callgraph as a lib #33

Open Lawliar opened 7 years ago

Lawliar commented 7 years ago

I want to simply print out a callgraph while using cil.callgraph as followed:

open Cil
module E = Errormsg
module L = List
module CG = Callgraph
let test f:file = 
  let cg= CG.computeGraph f in
  CG.printGraph stdout cg
(*merge the input file e.t.c.*)

however as I was using

 ocamlfind ocamlc -linkpkg -thread -package cil,cil.callgraph test.ml -o test.byte
the compiler complains

File "test.ml", line 1:
Error: Error while linking /home/lcm/.opam/system/lib/cil/cil.cma(Feature):
Reference to undefined global `Findlib'

I do not know where to start debugging with Does anyone have any idea?