Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Frama-C and XML parser

Tags:

ocaml

frama-c

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?

like image 685
Amiramet Avatar asked Aug 14 '26 22:08

Amiramet


1 Answers

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_BFLAGS allows to pass extra options to OCaml's bytecode compiler, such as -I /my/path/to/xml/library, -I `ocamlfind xml-light`, or -I $(XMLLIGHTPATH) where XMLLIGHTPATH is set up by your configure script (see also developer manual for that).
  • PLUGIN_OFLAGS is the equivalent for native compilation
  • PLUGIN_EXTRA_BYTE gives a list of files that your plug-in has to be linked against when compiled in bytecode, such as xmllight.cma
  • PLUGIN_EXTRA_OPT is the native code equivalent, such as xmllight.cmxa
like image 105
Virgile Avatar answered Aug 18 '26 00:08

Virgile



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!