I'm developing a plugin in Frama-C. I want to parse an xml file. I installed the package libxml-light-ocaml-dev but I get an error "Unbound module Xml" in compiling. I don't know how to proceed to make the package visible to Frama-C. Or should I use another package?
1 Answers
4
votes
Assuming you're using Makefile.dynamic as indicated in Frama-C's developer manual, there are a few variables that you have to tweak in order to compile and link your plug-in against external libraries:
PLUGIN_BFLAGSallows to pass extra options to OCaml's bytecode compiler, such as-I /my/path/to/xml/library,-I `ocamlfind xml-light`, or-I $(XMLLIGHTPATH)whereXMLLIGHTPATHis set up by your configure script (see also developer manual for that).PLUGIN_OFLAGSis the equivalent for native compilationPLUGIN_EXTRA_BYTEgives a list of files that your plug-in has to be linked against when compiled in bytecode, such asxmllight.cmaPLUGIN_EXTRA_OPTis the native code equivalent, such asxmllight.cmxa
-Iserves to make directories that contain libraries visible to the OCaml compiler when compiling a module that uses these libraries. - Pascal Cuoq